github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/docs/sources/operations/grafana.md (about) 1 --- 2 title: Loki in Grafana 3 weight: 15 4 aliases: 5 - /docs/loki/latest/getting-started/grafana/ 6 --- 7 # Loki in Grafana 8 9 [Grafana 6.0](https://grafana.com/grafana/download/6.0.0) and more recent 10 versions have built-in support for Grafana Loki. 11 Use [Grafana 6.3](https://grafana.com/grafana/download/6.3.0) or a more 12 recent version to take advantage of [LogQL]({{< relref "../logql/_index.md" >}}) functionality. 13 14 1. Log into your Grafana instance. If this is your first time running 15 Grafana, the username and password are both defaulted to `admin`. 16 1. In Grafana, go to `Configuration` > `Data Sources` via the cog icon on the 17 left sidebar. 18 1. Click the big <kbd>+ Add data source</kbd> button. 19 1. Choose Loki from the list. 20 1. The http URL field should be the address of your Loki server. For example, 21 when running locally or with Docker using port mapping, the address is 22 likely `http://localhost:3100`. When running with docker-compose or 23 Kubernetes, the address is likely `http://loki:3100`. 24 1. To see the logs, click <kbd>Explore</kbd> on the sidebar, select the Loki 25 datasource in the top-left dropdown, and then choose a log stream using the 26 <kbd>Log labels</kbd> button. 27 1. Learn more about querying by reading about Loki's query language [LogQL]({{< relref "../logql/_index.md" >}}). 28 29 Read more about Grafana's Explore feature in the 30 [Grafana documentation](http://docs.grafana.org/features/explore) and on how to 31 search and filter for logs with Loki. 32 33 To configure Loki as a datasource via provisioning, see [Configuring Grafana via 34 Provisioning](http://docs.grafana.org/features/datasources/loki/#configure-the-datasource-with-provisioning). 35 Set the URL in the provisioning.