Logo
Deploy Now

Stars

28,773

Forks

4,093

Watchers

383

Developer links

Grafana Loki

With over 28,600 GitHub stars and 450 contributors, Grafana Loki is the log aggregation system that takes the Prometheus approach to logging — indexing only metadata labels instead of full log content, making it dramatically cheaper and simpler to operate than traditional log management platforms. The label-based indexing strategy groups log streams using the same labels already applied to Prometheus metrics, enabling seamless switching between metrics and logs in Grafana dashboards without maintaining separate indexing infrastructure. Grafana Alloy, the telemetry collector replacing Promtail, scrapes and pushes logs with Prometheus-style service discovery, automatic Kubernetes Pod label extraction, and pipeline stages for parsing, filtering, and relabeling before ingestion. LogQL, the query language, combines label matchers for stream selection with regex line filters and aggregation functions, supporting rate calculations, pattern parsing, and metric generation from log data for alerting and dashboard panels. The storage architecture writes compressed log chunks and TSDB indexes to S3, GCS, Azure Blob Storage, or MinIO-compatible object stores, with configurable retention and compaction policies. Deployment modes scale from a single binary for development through monolithic high-availability mode with multiple replicas to full microservices decomposition with separate ingester, distributor, querier, query-frontend, compactor, and ruler components on Kubernetes via Helm charts. Multi-tenancy isolates data and query paths per tenant through header-based tenant ID assignment. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. AGPL-3.0 licensed.

Grafana Loki
Grafana Loki
Grafana Loki
Grafana Loki
Grafana Loki

Benefits

  • Label-Based Indexing Reduces Costs
  • Indexes only metadata labels instead of full log content, storing compressed unstructured logs in object storage for dramatically lower storage and operational costs compared to full-text indexing.
  • Prometheus-Native Label Compatibility
  • Uses the same label-based approach as Prometheus, enabling seamless switching between metrics and logs in Grafana dashboards using consistent labels across the entire observability stack.
  • Scales from Raspberry Pi to Petabytes
  • Run as a single binary for development, in monolithic HA mode for moderate scale, or as decomposed microservices on Kubernetes for petabyte-per-day ingestion with horizontal scaling.
  • Multi-Tenant Log Isolation
  • Header-based tenant ID assignment provides complete data and query path isolation per tenant, enabling shared infrastructure across teams and organizations without data leakage.

Features

  • LogQL Query Language
  • PromQL-inspired query language combines label matchers, regex line filters, aggregation functions, and metric generation from logs for alerting and dashboard visualizations.
  • Object Storage Backend
  • Stores compressed chunks and TSDB indexes in S3, GCS, Azure Blob Storage, or MinIO-compatible stores with configurable retention and compaction policies for cost optimization.
  • Grafana Alloy Collector
  • Alloy replaces Promtail with Prometheus-style service discovery, automatic Kubernetes Pod label extraction, and pipeline stages for parsing, filtering, and relabeling logs.
  • Kubernetes Native Fit
  • Automatic Pod label scraping and indexing, Helm chart deployment, and microservices decomposition make Loki purpose-built for Kubernetes log aggregation at scale.
  • Metric Generation from Logs
  • LogQL aggregation functions calculate rates, counts, and percentiles from log data, generating Prometheus-compatible metrics for alerting without separate metric pipelines.