Skip to content

Commit f4da88e

Browse files
docs: add X-Scope-OrgID header to Grafana datasource if multi-tenancy is enabled (#13914)
Co-authored-by: J Stickler <[email protected]>
1 parent 1b70866 commit f4da88e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/sources/visualize/grafana.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ If you are a Grafana Cloud user, you can access Explore Logs in the Grafana Clou
3838
1. Click the **+ Add new data source** button.
3939
1. Search for, or choose Loki from the list.
4040
1. On the **Settings** tab, the **URL** field should be the address of your Loki server.
41-
For example,when running locally or with Docker using port mapping, the address is likely `http://localhost:3100`.
41+
For example, when running locally or with Docker using port mapping, the address is likely `http://localhost:3100`.
4242
When running with docker-compose or Kubernetes, the address is likely `http://loki:3100`.
4343
When running Grafana (with Docker) and trying to connect to a locally built Loki instance, the address (for the URL field) is:
4444
On Mac: `docker.for.mac.localhost`
4545
On Windows: `docker.for.win.localhost`
46+
1. If your Loki server has [multi-tenancy](https://grafana.com/docs/loki/latest/operations/multi-tenancy/) enabled, then you must provide your tenant ID in the `X-Scope-OrgID` header. Click the **+ Add header** button under **HTTP headers**, enter `X-Scope-OrgID` in the **Header** field, and your tenant ID in the **Value** field. Multi-tenancy is enabled by default when running Loki with Helm on Kubernetes.
4647
1. To view your logs, click **Explore** in the main menu.
4748
1. Select the Loki datasource in the top-left menu.
4849
1. You can click **Kick start your query** to select from a list of common queries, or use the **Label filters** to start choosing labels that you want to query. For more information about the Loki query language, refer to the [LogQL section](https://grafana.com/docs/loki/<LOKI_VERSION>/query/).

0 commit comments

Comments
 (0)