The official guidance to use ITRS Analytics as a Data Source for Grafana is defined in this link: https://docs.itrsgroup.com/docs/itrs-analytics/latest/faqs/how-to-configure-grafana-authentication/index.html
Some additional points to consider when setting things.
Ensuring the correct hostname is defined in the grafana.ini file
Typically this is set up as domain = localhost
This should be changed to the actual hostname of where the Grafana server runs.
Example grafana.ini file (the fields that require modification)
Note you will need to restart grafana for these changes to take effect
# The http port to use
http_port = 3000
# The public facing domain name used to access grafana from a browser
domain = ec2-18-171-143-13.eu-west-2.compute.amazonaws.com
#################################### Generic OAuth #######################
[auth.generic_oauth]
name = ITRS Analytics
enabled = true
allow_sign_up = true
client_id = obcerv-apps
client_secret = LZplLkJSag4lPRJhUXGA4OGxqpqV0ZEP
scopes = openid profile email offline_access roles
email_attribute_path = email
login_attribute_path = username
name_attribute_path = full_name
role_attribute_path = contains(roles[*], 'admin') && 'GrafanaAdmin' || 'Editor'
auth_url = https://ec2-18-171-143-13.eu-west-2.compute.amazonaws.com/auth/realms/obcerv/protocol/openid-connect/auth
token_url = https://ec2-18-171-143-13.eu-west-2.compute.amazonaws.com/auth/realms/obcerv/protocol/openid-connect/token
api_url = https://ec2-18-171-143-13.eu-west-2.compute.amazonaws.com/auth/realms/obcerv/protocol/openid-connect/userinfo
tls_skip_verify_insecure = true
Configure valid redirect URL's in Keycloak
This should be set as per like the example below:
Configure the realm roles mapper in Keycloak
This should be set as per like the example below:
Ensure Token Claim Name is set to roles:
Create a User in Keycloak with admin role rights:
Create a user in Users.
Note as in below - ensure an entry is put in for the Email field - the account does not actually have to be a valid one.
Set a password for the newly created user:
Ensure Temporary option is unticked:
Under Realm Roles - create a role:
Under Users for the grafana-user that we created assign roles to the user:
And also assign realm roles to the user:
Result:
Login to Grafana with the newly created grafana-user account:
You will be redirect to a screen like below:
After logging in, you should be directed inside Grafana - you can navigate to Connections and Data Sources and click Explore:
Then click inside the Metrics drop down:
Try something, e.g. cputilisation - as soon as you type entries should appear so you can scroll and select.
Click Run Query, and data should appear:
If you need further help
-
Please contact our support team via the chat service box on any of our websites or raise a support request.
-
Make sure you provide us with:
- Background of the issue or request.
- Use cases, requirements, business impact, etc.
- Encountered error messages.
- Log files or diagnostic files.
- Screenshots.
- And other important information relevant to your inquiry.
Comments
0 comments
Please sign in to leave a comment.