Like Prometheus, but for logs
open sourceAGPL-3.0-onlyself-hostablefree
Grafana Loki is a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus. Instead of indexing the full text of logs it indexes a set of labels for each log stream and stores compressed logs in object storage, which makes it cheaper to run and simpler to operate. You query it with LogQL from Grafana or from logcli, its command-line client, can tail logs live, build metrics and alerts from log lines and send alerts to Prometheus Alertmanager. Grafana Labs started it in 2018 and leads its development; it is AGPLv3 and also offered hosted in Grafana Cloud.
Ways to install
On your own server
Package managers
Problems it solves
- store logs from all my servers and Kubernetes pods cheaply without running Elasticsearch
- search my container logs in Grafana next to the metrics I already have from Prometheus
- centralize my home lab's Docker logs in one place I can search
- my log storage bill is huge because everything gets full-text indexed
- query and tail logs from the terminal instead of a web UI
- download a time range of logs or count log streams to check label cardinality from the command line
- alert when a particular error starts showing up in my application logs
- turn log lines into metrics and graphs without a separate pipeline
- keep months of logs in cheap object storage instead of on expensive disks
- run a multi-tenant log backend that several teams share
- keep our logs in an S3 bucket where storage is cheap and still search them by label in Grafana
Features
- indexes labels per log stream instead of full text
- persists logs to object storage
- LogQL query language
- logcli command-line client for LogQL queries, downloads and cardinality analysis
- live tailing of logs
- metrics and alerting rules from log lines, routed to Prometheus Alertmanager
- native Grafana data source
- horizontally scalable, highly available and multi-tenant
- Docker driver client to send container logs
- Loki Canary to detect missing logs
View 1 more
- HTTP API for pushing and querying logs
Limitations
Ways to run it
Grafana Loki
You arrange
- object storage for log data
- Grafana for querying and dashboards
- a log collector such as Grafana Alloy
Grafana Cloud
Price not published4
Only in this edition
- Loki hosted by Grafana Labs as part of Grafana Cloud
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
Alternatives
The same job
These do what Grafana Loki does.
- OpenObserve Open source observability for logs, metrics, traces, RUM and session replay
- Elasticsearch Open source search, analytics, and AI platform
- Quickwit Cloud-native search engine for observability: sub-second search and analytics on cloud storage
- OpenSearch The open engine for AI-powered search and observability
- Graylog The SIEM and Log Management Platform for the AI Era
- SigNoz Open-source, OpenTelemetry-native observability: logs, metrics and traces in one tool
