talira

Grafana Loki

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

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

  • Doesn't index the full text of log lines: it indexes only a set of labels for each log stream45

Ways to run it

Grafana Loki

You run it, AGPL-3.0-only

free56

You arrange

  • object storage for log data
  • Grafana for querying and dashboards
  • a log collector such as Grafana Alloy

Self-hosting docs

Grafana Cloud

Hosted by Grafana Labs

Price not published4

Only in this edition

  • Loki hosted by Grafana Labs as part of Grafana Cloud

Pricing

Capabilities

Has an APIplan not known
Has a command line toolplan not known

Alternatives

The same job

These do what Grafana Loki does.

  1. OpenObserve Open source observability for logs, metrics, traces, RUM and session replay
  2. Elasticsearch Open source search, analytics, and AI platform
  3. Quickwit Cloud-native search engine for observability: sub-second search and analytics on cloud storage
  4. OpenSearch The open engine for AI-powered search and observability
  5. Graylog The SIEM and Log Management Platform for the AI Era
  6. SigNoz Open-source, OpenTelemetry-native observability: logs, metrics and traces in one tool

Compare Grafana Loki with the top 3