Grafana Loki

active

by Grafana Labs · since 2018 · also known as Loki

Label-indexed log aggregation: Prometheus-style streams, chunks on object storage, LogQL queries.

time-seriesdatabase engineopen source (copyleft)mature

Overview

Grafana Loki stores logs as compressed chunks in object storage and indexes only a small set of labels per stream, the way Prometheus labels metrics. That makes ingestion and retention cheap compared with full-text indexes, at the price of brute-force scanning for content filters, which Loki parallelises across queriers. LogQL combines label selectors, line filters, parsers and metric aggregations, and Grafana, Alloy and OpenTelemetry are first-class clients. The 3.x releases added structured metadata, native OTLP ingestion and bloom-filter acceleration to ease high-cardinality fields, but label design is still the biggest operational decision.

Strengths & trade-offs

Strengths

  • +Cheap to run: small label index and compressed chunks on object storage
  • +LogQL feels familiar to PromQL users and can turn logs into metrics
  • +Tight integration with Grafana, Mimir and Tempo for metrics-logs-traces correlation
  • +Native OTLP ingestion and structured metadata for OpenTelemetry pipelines
  • +Official Kubernetes operator and Helm charts

Trade-offs

  • −Content searches scan data, so needle-in-haystack queries over long ranges are slow
  • −High-cardinality labels break performance; label design needs discipline
  • −AGPL-3.0 licence
  • −Microservices mode has many components and tuning knobs

Great for

  • +Kubernetes and application logs alongside Prometheus
  • +Cost-efficient log retention on S3
  • +Deriving metrics and alerts from log lines
  • +Correlating logs with traces in Grafana

Think twice for

  • −Full-text search with relevance ranking
  • −Security analytics needing fast arbitrary-field search
  • −SQL analytics over logs

Capabilities

Native or official first-party support · 5 of 25 tracked

✓JSON
✓TTL / expiry
✓Durable persistence
✓Compression
✓Streaming ingest
–Transactions
–Joins
–Secondary indexes
–Full-text search
–Vector search
–Geospatial
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–Pub/Sub
–Columnar storage
–In-memory
–Encryption at rest
–Role-based access
–Time travel
–Branching
–Online schema changes
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Massive · Multi-PB
Horizontal scaling
Native
Multi-region
No
Transactions
None
Consistency
Eventual
Schema
Schemaless
Architecture
Single node, Distributed, Shared storage
Query languages
LogQL

Monolithic, simple-scalable and microservices modes; chunks and TSDB index live in object storage.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

available on · AWS · Google Cloud · Azure

Ecosystem

compatible withS3
apis & protocolsLoki push API, OTLP, HTTP query API

Alternatives to Grafana Loki

Compare all→
VictoriaLogsSearch Engine19.4

Log database from the VictoriaMetrics team: schemaless ingestion, LogsQL and low RAM and disk use.

grafana-loki vs victorialogs →
ElasticsearchSearch Engine75.1

Lucene-based distributed search and analytics engine for text, vectors, logs and metrics.

grafana-loki vs elasticsearch →
OpenSearchSearch Engine56.6

Apache-licensed, foundation-governed fork of Elasticsearch for search, vectors and observability.

grafana-loki vs opensearch →
OpenObserveSearch Engine20.4

Single-binary Rust observability platform storing logs, metrics and traces as Parquet on object storage.

grafana-loki vs openobserve →
ParseableColumnar / OLAP18.6

Rust telemetry datalake for logs, metrics and traces on S3, queried with SQL.

grafana-loki vs parseable →
QuickwitSearch Engine11.9

Cloud-native search engine on object storage for logs and traces, built on Tantivy.

grafana-loki vs quickwit →

Grafana Loki FAQ

What is Grafana Loki?

Grafana Loki is a time-series database by Grafana Labs, first released in 2018. Grafana Loki stores logs as compressed chunks in object storage and indexes only a small set of labels per stream, the way Prometheus labels metrics. That makes ingestion and retention cheap compared with full-text indexes, at the price of brute-force scanning for content filters, which Loki parallelises across queriers. LogQL combines label selectors, line filters, parsers and metric aggregations, and Grafana, Alloy and OpenTelemetry are first-class clients. The 3.x releases added structured metadata, native OTLP ingestion and bloom-filter acceleration to ease high-cardinality fields, but label design is still the biggest operational decision.

Is Grafana Loki open source?

Yes. Grafana Loki is open source. License: GNU AGPL v3.0.

Does Grafana Loki support ACID transactions?

No. Grafana Loki does not provide ACID transactions; its consistency model is eventual.

Does Grafana Loki scale horizontally?

Grafana Loki scales horizontally out of the box, with built-in sharding or partitioning. It is comfortable at massive scale (Multi-PB).

How can I run Grafana Loki?

You can self-host it and use the vendor's managed cloud. Managed offerings include Grafana Cloud Logs. It is available on AWS, Google Cloud and Azure.

What is Grafana Loki best for?

Grafana Loki is a strong fit for kubernetes and application logs alongside Prometheus; cost-efficient log retention on S3; and deriving metrics and alerts from log lines. Think twice for full-text search with relevance ranking.

What are the best alternatives to Grafana Loki?

Common alternatives to Grafana Loki include VictoriaLogs, Elasticsearch, OpenSearch, OpenObserve and Parseable. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is Grafana Loki?

Grafana Loki ranks #96 of 844 databases on the WhichDB Score (28.7/100), and #6 among time-series databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.