Set up a Grafana Enterprise Logs instance
Create a Grafana Enterprise Logs instance:
-
Navigate to Grafana Enterprise Logs > Instances.
-
Click on Create new instance.
-
Choose a name for your instance. For demonstration purposes, use the name
demo
. -
Select the cluster.
-
Click Create instance.
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 instance 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 instance 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 instance can write logs into the instance 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 instance 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.