Back to articles
Grafana Loki Has a Free API — Log Aggregation Without Indexing Full Text
How-ToDevOps

Grafana Loki Has a Free API — Log Aggregation Without Indexing Full Text

via Dev.to DevOpsAlex Spinov

Grafana Loki is the cost-effective log aggregation system that indexes only metadata (labels), not the full log text. This makes it 10-100x cheaper than Elasticsearch while still being fast. Free, open source, by Grafana Labs. The 'Prometheus for logs.' Why Use Loki? Cheap storage — doesn't index log content, only labels Prometheus-like — same label-based querying as Prometheus LogQL — powerful query language for filtering and aggregating logs Kubernetes-native — auto-discovers pod logs via Promtail/Alloy Multi-tenant — built-in multi-tenancy support Quick Setup 1. Install # Docker docker run -d --name loki -p 3100:3100 grafana/loki:latest # Helm helm repo add grafana https://grafana.github.io/helm-charts helm install loki grafana/loki-stack --set promtail.enabled = true 2. Push Logs # Push a log entry curl -s -X POST http://localhost:3100/loki/api/v1/push \ -H "Content-Type: application/json" \ -d '{ "streams": [{ "stream": {"app": "my-scraper", "env": "production"}, "values": [ ["' $

Continue reading on Dev.to DevOps

Opens in a new tab

Read Full Article
3 views

Related Articles