Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana/next/datasources/loki.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana/next/datasources/loki/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
This is documentation for the next version of Grafana documentation. For the latest stable release, go to the latest version.
Loki data source
Grafana Loki is a horizontally scalable, highly available, multi-tenant log aggregation system by Grafana Labs. Unlike other logging systems, Loki indexes only metadata about your logs in the form of labels, the same label model used by Prometheus. Loki compresses and stores the log content itself in chunks in object stores such as Amazon S3 or Google Cloud Storage, or on a local filesystem. The Loki data source in Grafana lets you query and visualize those logs, and correlate them with metrics, traces, and other data in unified dashboards.
Grafana includes built-in support for Loki, so you don’t need to install a plugin.
Supported features
| Feature | Supported |
|---|---|
| Logs | Yes |
| Metrics | Yes. Use LogQL metric queries to derive metrics from logs. |
| Traces | No |
| Alerting | Yes |
| Annotations | Yes |
Get started
The following documents help you get started with the Loki data source:
- Configure the Loki data source
- Loki query editor
- Template variables
- Loki annotations
- Loki alerting
- Troubleshoot Loki issues
To learn more about Loki itself, refer to the following Loki documentation:
Additional features
After configuring the Loki data source, you can:
- Use Explore to query and live tail logs without building a dashboard.
- Use Grafana Logs Drilldown to explore your Loki logs without writing LogQL queries.
- Create a wide variety of visualizations.
- Add transformations to manipulate query results.
- Set up alerting on your logs.
- Add annotations to overlay log events on your graphs.
- Optimize performance with query caching.
Related resources
Was this page helpful?
Related resources from Grafana Labs


