Prometheus is an open-source systems and service monitoring system that collects metrics, evaluates rules, and triggers alerts.
grafana/loki
Horizontally scalable, multi-tenant log aggregation system that indexes only labels, not log contents, from Grafana Labs.
Open-source alternative to:Splunk
Datadog Logs
- Stars
- 29,048
- Forks
- 4,146
- Open issues
- 1,139
- Last commit
- 6 hours ago
What is it?
Loki is a log aggregation system inspired by Prometheus. Instead of full-text indexing every log line, it stores compressed, unstructured logs and indexes only a set of labels for each log stream. This keeps storage and operating costs lower, and it lets you query logs with the same label model you use for Prometheus metrics.
A Loki-based logging stack typically combines three components: Alloy, which collects logs and sends them to Loki; Loki itself, which stores logs and processes queries; and Grafana, which is used to query and display them. Loki receives logs by push rather than pull, and it can run as a single binary with no external dependencies. It is also well suited to Kubernetes Pod logs, since Pod metadata such as labels can be scraped and indexed automatically.
The project provides a LogCLI command-line tool for querying, Loki Canary for detecting missing logs, and a Docker logging driver plugin that sends container logs directly to Loki. It supports multi-tenant operation when authentication is enabled.
Key features
- 01Indexes only label sets per log stream instead of full log text.
- 02Uses the same label model as Prometheus, making it easy to move between metrics and logs.
- 03Runs as a single binary with no dependencies, or as horizontally scalable microservices.
- 04Supports multi-tenant deployments with per-tenant runtime overrides.
- 05Includes LogCLI for querying and Loki Canary for detecting missing logs.
- 06Provides a Docker plugin that sends container logs directly to Loki.
Use cases
- Collecting and querying Kubernetes Pod logs with labels from Pod metadata.
- Building a cost-conscious centralized logging stack paired with Grafana dashboards.
- Correlating application logs with Prometheus metrics using shared labels.
- Running a multi-tenant log platform where different teams keep their logs separate.
Quick start
- 1
Clone the source code repository
git clone https://github.com/grafana/loki - 2
Enter the project directory
cd loki - 3
Build the Loki binary with Go
go build ./cmd/loki - 4
Run Loki with the local config file
./loki -config.file=./cmd/loki/loki-local-config.yaml
Things to know
- Requires an up-to-date Go toolchain to build from source.
- Helm chart maintenance is moving to a separate repository for non-GEL users.
Topics
FAQ
- What is loki?
- Horizontally scalable, multi-tenant log aggregation system that indexes only labels, not log contents, from Grafana Labs. Loki is a log aggregation system inspired by Prometheus. Instead of full-text indexing every log line, it stores compressed, unstructured logs and indexes only a set of labels for each log stream. This keeps storage and operating costs lower, and it lets you query logs with the same label model you use for Prometheus metrics.
- Is loki free to use? What license does it have?
- loki is open source under the AGPL-3.0 license. Check the license terms before using it in commercial products.
- Is loki still maintained?
- Actively maintained. The last commit to loki was on Oct 21, 2026.
- What can I use loki for?
- Collecting and querying Kubernetes Pod logs with labels from Pod metadata. Building a cost-conscious centralized logging stack paired with Grafana dashboards. Correlating application logs with Prometheus metrics using shared labels. Running a multi-tenant log platform where different teams keep their logs separate.
- How do I install loki?
- Clone the source code repository: git clone https://github.com/grafana/loki Enter the project directory: cd loki Build the Loki binary with Go: go build ./cmd/loki Run Loki with the local config file: ./loki -config.file=./cmd/loki/loki-local-config.yaml
- Where can I get loki?
- The source code and installation instructions are on GitHub: https://github.com/grafana/loki
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Builds and manages Grafana dashboards and prefilled alerts for common services and infrastructure, so you don't write queries by hand.
Open-source real-time infrastructure monitoring agent with per-second metrics, auto-discovery, built-in ML anomaly detection and alerting.
An open-source observability database that stores metrics, logs, and traces in one columnar engine on object storage, queryable with SQL and PromQL.
Ultra-low-latency asynchronous C++17 logging and metrics library that defers formatting and I/O to a background thread.
Open-source platform to query, visualize, alert on and explore metrics, logs and traces from many data sources.