This is documentation for the next version of Loki. For the latest stable release, go to the latest version.

Open source

Visualize log data

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 functionality.

  1. Log into your Grafana instance. If this is your first time running Grafana, the username and password are both defaulted to admin.
  2. In Grafana, go to Configuration > Data Sources via the cog icon on the left sidebar.
  3. Click the big + Add data source button.
  4. Choose Loki from the list.
  5. 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 likely http://loki:3100.
    When running Grafana (with Docker) and trying to connect to a locally built Loki instance, the address (for the URL field) is:
    On Mac: docker.for.mac.localhost
    On Windows:
  6. To see the logs, click Explore on the sidebar, select the Loki data source in the top-left dropdown, and then choose a log stream using the Log labels button.
  7. Learn more about querying by reading about Loki’s query language LogQL.

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 data source via provisioning, see Configuring Grafana via Provisioning. Set the URL in the provisioning.