
Grafana Loki Has a Free API: Like Prometheus, But for Logs
Grafana Loki is a horizontally scalable, highly available log aggregation system. Unlike Elasticsearch, it only indexes metadata (labels), making it cost-effective to operate at scale. What Is Loki? Loki is designed to be very cost-effective and easy to operate. It does not index the contents of the logs, but rather a set of labels for each log stream — like Prometheus does for metrics. Key Features: Label-based log indexing (like Prometheus) LogQL query language Native Grafana integration Multi-tenant support S3/GCS/Azure object storage backend Promtail, Fluentd, Fluent Bit agents Alert rules on log patterns Structured metadata Quick Start # Docker docker run -d --name loki -p 3100:3100 grafana/loki:latest # Kubernetes via Helm helm repo add grafana https://grafana.github.io/helm-charts helm install loki grafana/loki-stack -n monitoring --create-namespace \ --set promtail.enabled = true \ --set grafana.enabled = true Loki API: Push and Query Logs Push Logs import requests import time
Continue reading on Dev.to DevOps
Opens in a new tab

