Skip to content

Logs instance as data source in Grafana

To connect Grafana to Logs instance, you need to create a new Loki data source connection in Grafana server. This guide shows the steps to perform for making the connection.

  1. Visit the STACKIT Portal.
  2. On the sidebar click on Logs.
  3. Select the Logs instance you want to connect.
  4. On the sidebar click on API.
  5. Under Info copy/note the URL from Data source.
  6. Then the value of token under Access tokens with read permissions.

Create Loki Data source and authentication

Section titled “Create Loki Data source and authentication”
  1. Visit the Grafana server with Admin access.
  2. On the sidebar click on Connections.
  3. Then under Connections, click Data sources.
  4. Click Add new data source.
  5. Select Loki from the list to create a new source.
  6. Set the name of the source.
  7. Under Connection, set the URL value taken from Logs instance in STACKIT Portal.
  8. Scroll down and look for HTTP Headers section, click on it.
  9. Click Add header, it will show two text fields.
  10. In Header field write Authorization.
  11. In Value field for Authorization header, put the value as Bearer <Token value from Logs instance Access Token>. For example Bearer eyJhbGc....
  12. Scroll down and click Save & Test.

If everything is configured correctly in the data source, the data source will be created successfully. You can now use this data source to view the logs in Grafana Explore section