---
title: "Visualize log data | Grafana Loki documentation"
description: "Visualize your log data with Grafana"
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Visualize log data

Modern Grafana versions after 6.3 have built-in support for Grafana Loki and [LogQL](/docs/loki/v2.9.x/query/).

## Using Explore

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 `Connections` &gt; `Data Sources` via the cog icon on the left sidebar.
3. Click the big `+ Add a new data source` button.
4. Search for, or 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: `docker.for.win.localhost`
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](../../query/).

If you would like to see an example of this live, you can try [Grafana Play’s Explore feature](https://play.grafana.org/explore?schemaVersion=1&panes=%7B%22v1d%22%3A%7B%22datasource%22%3A%22ac4000ca-1959-45f5-aa45-2bd0898f7026%22%2C%22queries%22%3A%5B%7B%22refId%22%3A%22A%22%2C%22expr%22%3A%22%7Bagent%3D%5C%22promtail%5C%22%7D%20%7C%3D%20%60%60%22%2C%22queryType%22%3A%22range%22%2C%22datasource%22%3A%7B%22type%22%3A%22loki%22%2C%22uid%22%3A%22ac4000ca-1959-45f5-aa45-2bd0898f7026%22%7D%2C%22editorMode%22%3A%22builder%22%7D%5D%2C%22range%22%3A%7B%22from%22%3A%22now-1h%22%2C%22to%22%3A%22now%22%7D%7D%7D&orgId=1)

Read more about Grafana’s Explore feature in the [Grafana documentation](http://docs.grafana.org/features/explore) and on how to search and filter for logs with Loki.

## Using Grafana Dashboards

Because Loki can be used as a built-in data source above, we can use LogQL queries based on that datasource to build complex visualizations that persist on Grafana dashboards.

Give it a try using Grafana Play

With Grafana Play, you can explore and see how it works, learning from practical examples to accelerate your development. This feature can be seen on [Loki Example Grafana Dashboard](https://play.grafana.org/d/T512JVH7z/).

[Try it](https://play.grafana.org/d/T512JVH7z/)

Read more about how to build Grafana Dashboards in [build your first dashbboard](/docs/grafana/latest/getting-started/build-first-dashboard/)

To configure Loki as a data source via provisioning, see [Configuring Grafana via Provisioning](http://docs.grafana.org/features/datasources/loki/#configure-the-datasource-with-provisioning). Set the URL in the provisioning.
