Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Set up a Grafana Enterprise Logs tenant
Create a Grafana Enterprise Logs (GEL) tenant:
Navigate to Grafana Enterprise Logs > Tenants.
Click on Create new tenant.
Choose a name for your tenant. For demonstration purposes, use the name
demo
.Select the cluster.
Click Create tenant.
Create a data source access policy and token
Create an access policy and a token, that are used by Grafana itself to access the logs in the tenant named demo
:
Navigate to Grafana Enterprise Logs > Access policies.
Click Create new access policy.
Choose a name for the policy. For demonstration purposes, use
demo-grafana
.Select the tenant demo.
Enable the scope read.
Click on Create.
From the newly created access policy, click + Add token.
Name the token demo-grafana, and click on Create.
In the next window, copy the token.
Next, use this access policy and token to create a new data source in Grafana:
Navigate to Configuration > Data Sources.
Click on Add new data source.
Choose a name for this data source. For demonstration purposes, use
Enterprise Logs
.Select Loki.
Set the URL to
http://<GEL host>:3100
.Enable Basic Auth and use User
demo
and as Password the token from your clipboard.Click Save & Test.
Create a Promtail access policy and token
To be able to have some metrics inside our cluster, create an access policy so that a Promtail agent can write logs into the tenant demo:
Navigate to Grafana Enterprise Logs > Access policies.
Click on Create new access policy.
Choose a name for the policy. For demonstration purposes, use demo-promtail.
Select the tenant demo.
Enable the scope write.
Click on Create.
From the newly created access policy, click on + Add token.
We call the token demo-promtail again and click on Create.
In the next window, copy the token.