Loki Flashcards

📜 Loki Flashcards

Open-source log aggregation system for cost-efficient observability

💡 What is Loki?

Loki is a horizontally scalable, highly available log aggregation system from Grafana Labs, designed to work seamlessly with Prometheus and Grafana.

🗄️ Log Storage Model

Stores logs in compressed chunks and indexes only labels instead of the full text, making it more cost-effective than traditional log storage systems.

🏷️ Labels & Metadata

Labels are key-value pairs used for organizing and querying logs efficiently. The label set defines a log stream.

🔍 LogQL

Query language inspired by PromQL that allows filtering, parsing, and aggregating logs using labels and line content.

📥 Log Ingestion

Collects logs from agents such as Promtail, Fluentd, Fluent Bit, Grafana Agent, or custom integrations.

📤 Log Output

Logs can be visualized directly in Grafana, allowing correlation with metrics and traces for complete observability.

📑 Log Streams

A stream is a set of logs with identical label pairs. Streams are the fundamental unit of storage and querying in Loki.

🔗 Metrics from Logs

Supports generating metrics from log data by parsing fields and applying aggregation functions in LogQL.

🛡️ Multi-Tenancy

Provides isolation between tenants using unique tenant IDs, enabling secure log storage for multiple users or organizations.

⚙️ Scalability & Modes

Can run as a single-process monolith for small setups or as microservices for large-scale, distributed deployments.

🧩 Integrations

Integrates with Grafana for visualization, Prometheus for metrics, Tempo for traces, and supports OpenTelemetry pipelines.

🚀 Deployment Options

Deployable via Docker, Kubernetes, Helm charts, or as a fully managed service through Grafana Cloud.