Back to ITRS Analytics FAQ

Troubleshooting setting up Grafana for ITRS Analytics

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 up:

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 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 URLs in Keycloak

This should be set as in the example below:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

Configure the realm roles mapper in Keycloak

This should be set as in the example below:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

Ensure Token Claim Name is set to roles:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

Create a user in Keycloak with admin role rights:

Create a user in Users.

Note as below - ensure an entry is put in for the Email field - the account does not actually have to be a valid one.

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

Set a password for the newly created user:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

Ensure Temporary option is unticked:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

Under Realm Roles, create a role:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

Under Users for the grafana-user that we created, assign roles to the user:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

And also assign realm roles to the user:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

Result:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

Login to Grafana with the newly created grafana-user account:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

You will be redirected to a screen like the one below:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

After logging in, you should be directed inside Grafana - you can navigate to Connections and Data Sources and click Explore:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

Then click inside the Metrics drop-down:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

Try something, e.g. cputilisation - as soon as you type, entries should appear so you can scroll and select.

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

Click Run Query, and data should appear:

ITRS Analytics - Troubleshooting setting up Grafana for ITRS Analytics

["Geneos"] ["FAQ"]

Was this topic helpful?