mirror of
https://github.com/grafana/loki.git
synced 2025-08-02 20:08:13 +08:00

The product name is Grafana Loki. The first use of the product name on each web page should be the full product name. After that, within each page, it is fine to use just Loki. This PR also set up some frontmatter with weights where it was missing on a few files, and correct where "Loki" was not capitalized.
1.6 KiB
1.6 KiB
title | weight |
---|---|
Loki in Grafana | 30 |
Loki in Grafana
Grafana 6.0 and more recent versions have built-in support for Grafana Loki. Use Grafana 6.3 or a more recent version to take advantage of [LogQL]({{< relref "../logql/_index.md" >}}) functionality.
- Log into your Grafana instance. If this is your first time running
Grafana, the username and password are both defaulted to
admin
. - In Grafana, go to
Configuration
>Data Sources
via the cog icon on the left sidebar. - Click the big + Add data source button.
- Choose Loki from the list.
- The http URL field should be the address of your Loki server. For example,
when running locally or with Docker using port mapping, the address is
likely
http://localhost:3100
. When running with docker-compose or Kubernetes, the address is likelyhttp://loki:3100
. - To see the logs, click Explore on the sidebar, select the Loki datasource in the top-left dropdown, and then choose a log stream using the Log labels button.
- Learn more about querying by reading about Loki's query language [LogQL]({{< relref "../logql/_index.md" >}}).
Read more about Grafana's Explore feature in the Grafana documentation and on how to search and filter for logs with Loki.
To configure Loki as a datasource via provisioning, see Configuring Grafana via Provisioning. Set the URL in the provisioning.