Skip to main content
⎈K8sCalc
observability

What is Loki?

A horizontally scalable log aggregation system by Grafana Labs. Unlike Elasticsearch, Loki only indexes metadata labels, storing log content as compressed chunks in object storage.

Loki explained

How it works. Loki stores logs as compressed chunks, usually in object storage, and indexes only a small set of labels (namespace, app, pod). Queries in LogQL first select streams by labels, then filter or parse the log lines.

In practice. Collect logs with Grafana Alloy, Promtail (now deprecated in favour of Alloy) or the OpenTelemetry Collector; store chunks in S3-compatible storage; query from Grafana next to your metrics and traces.

Common pitfalls. Too many labels or high-cardinality labels (request IDs as labels) — put those in the log line instead; queries over long time ranges without narrow label selectors; retention not configured on the compactor.

Related tool

K8s Cluster Cost

Calculate the monthly cost of running a self-managed Kubernetes cluster on Hetzner Cloud, Vultr, or DigitalOcean. Choose server types for control planes, workers, and load balancers with HA mode.

Related Calculators

Related Generators

Related Comparisons