Grafana Loki is a free, open source monitoring & observability project written in Go and released under AGPL-3.0. It has 28,909 GitHub stars, 4,112 forks and 1,620 open issues, and was last pushed 5 hours ago. On this registry it ranks #8 of 97 tracked projects in Monitoring & Observability, with 5 head-to-head comparisons available. It gained 32 stars over the last 6 tracked days.

Grafana Loki — Cost-effective log aggregation that indexes labels, not full text

What is Grafana Loki?

What it is

Grafana Loki is a log aggregation system designed as the log-oriented counterpart to Prometheus. It operates within the cloud-native observability ecosystem, specifically targeting Kubernetes and containerized environments. Loki avoids expensive full-text indexing by indexing only metadata labels attached to log streams, storing the raw log content in compressed form. This design choice makes Loki significantly simpler to operate and more cost-effective than traditional log systems that index every word.

Loki solves the problem of high operational overhead and infrastructure cost associated with log aggregation in dynamic environments. By aligning log indexing with Prometheus-style labels, it enables seamless correlation between metrics and logs using the same dimensional data, reducing complexity for teams already using Prometheus.

Key capabilities

  • Indexes logs using label-based metadata only, not full-text content
  • Horizontally scalable and highly available architecture with multi-tenancy support
  • Automatically scrapes Kubernetes Pod labels and uses them as log stream labels
  • Integrates natively with Grafana for querying and visualization (requires Grafana v6.0+)
  • Uses push-based data ingestion via Alloy (Promtail is deprecated)
  • Includes LogCLI for command-line log querying and Loki Canary for health monitoring
  • Supports Docker Driver plugin for direct container log shipping

Who uses it and how

  • Kubernetes operators deploy Alloy to collect logs from node-level containers and ship them to Loki for centralized storage
  • SRE teams use Loki alongside Prometheus to correlate application logs with metrics using shared label sets (e.g., pod, namespace, service)
  • Development teams query logs directly in Grafana dashboards to debug issues without switching tools
  • Organizations running multi-tenant clusters leverage Loki’s tenant isolation for secure log separation

Getting started

Install Loki using Helm (from grafana-community/helm-charts as of March 2026), Docker Compose, or the single-binary distribution. Deploy Alloy as the log collector using Helm or static manifests, then configure Grafana to add Loki as a datasource.

When to use it — and when not to

Use Loki when you need a lightweight, Prometheus-aligned log system for Kubernetes and want to avoid the cost and complexity of full-text search. It is ideal for teams already invested in the Grafana/Prometheus stack. Avoid it when you require deep full-text search capabilities (e.g., regex over arbitrary log content), compliance-driven log retention with immutable audit trails, or integration with legacy SIEM systems. Loki requires separate storage (e.g., S3, GCS, or local disk) and a database (e.g., DynamoDB, Cassandra, or boltdb-shipper) depending on deployment mode, and does not include built-in SMTP or alerting — those must be configured externally.

project readme (upstream, from github) — read inline

Check Go Report Card Slack Fuzzing Status

Loki: like Prometheus, but for logs.

Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus. It is designed to be very cost effective and easy to operate. It does not index the contents of the logs, but rather a set of labels for each log stream.

Compared to other log aggregation systems, Loki:

  • does not do full text indexing on logs. By storing compressed, unstructured logs and only indexing metadata, Loki is simpler to operate and cheaper to run.
  • indexes and groups log streams using the same labels you’re already using with Prometheus, enabling you to seamlessly switch between metrics and logs using the same labels that you’re already using with Prometheus.
  • is an especially good fit for storing Kubernetes Pod logs. Metadata such as Pod labels is automatically scraped and indexed.
  • has native support in Grafana (needs Grafana v6.0).

A Loki-based logging stack consists of 3 components:

  • Alloy is agent, responsible for gathering logs and sending them to Loki.
  • Loki is the main service, responsible for storing logs and processing queries.
  • Grafana for querying and displaying the logs.

Note that Alloy replaced Promtail in the stack, because Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy.

Loki is like Prometheus, but for logs: we prefer a multidimensional label-based approach to indexing, and want a single-binary, easy to operate system with no dependencies. Loki differs from Prometheus by focusing on logs instead of metrics, and delivering logs via push, instead of pull.

Getting started

⚠️ Helm Chart Migration

Effective March 16, 2026, the Grafana Loki Helm chart will be forked to a new repository grafana-community/helm-charts. The chart in the Loki repository will continue to be maintained for GEL users only. See #20705 for details.

Upgrading

Documentation

Commonly used sections:

Getting Help

If you have any questions or feedback regarding Loki:

Your feedback is always welcome.

Further Reading

Contributing

Refer to CONTRIBUTING.md

Building from source

Loki can be run in a single host, no-dependencies mode using the following commands.

You need an up-to-date version of Go, we recommend using the version found in our Makefile

# Checkout source code
$ git clone https://github.com/grafana/loki
$ cd loki

# Build binary
$ go build ./cmd/loki

# Run executable
$ ./loki -config.file=./cmd/loki/loki-local-config.yaml

Alternatively, on Unix systems you can use make to build the binary, which adds additional arguments to the go build command.

# Build binary
$ make loki

# Run executable
$ ./cmd/loki/loki -config.file=./cmd/loki/loki-local-config.yaml

To run multiple Loki tenants locally, ensure that auth_enabled is set to true and provide a runtime config with any tenant specific overrides.

# Build binary
$ make loki

# Run executable
./loki -config.file=./cmd/loki/loki-local-multi-tenant-config.yaml -runtime-config.file=./cmd/loki/loki-overrides.yaml

Adopters

Please see ADOPTERS.md for some of the organizations using Loki today. If you would like to add your organization to the list, please open a PR to add it to the list.

License

Grafana Loki is distributed under AGPL-3.0-only. For Apache-2.0 exceptions, see LICENSING.md.

Frequently asked questions

Is Grafana Loki free to use?

Grafana Loki is open source under the AGPL-3.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does Grafana Loki do?

Cost-effective log aggregation that indexes labels, not full text

What is Grafana Loki written in?

Grafana Loki is primarily written in Go. Its source is publicly available at https://github.com/grafana/loki, and it has 28,909 GitHub stars.