Cloud Intermediate
Loki + Grafana — Centralized Logs¶
LokiGrafanaLogging 3 min read
Lightweight log aggregation with Loki and visualization in Grafana.
Why Loki?¶
Loki is “Prometheus for logs”. It doesn’t index log content, only labels. Much cheaper than Elasticsearch.
Installation¶
helm install loki grafana/loki-stack \
--namespace monitoring \
--set promtail.enabled=true \
--set grafana.enabled=false # We already have Grafana
LogQL Queries¶
{namespace=”production”, app=”api”} |= “error”
{app=”api”} | json | status >= 500
rate({app=”api”} |= “error” [5m])
Summary¶
Loki + Promtail + Grafana = affordable and efficient centralized logging. LogQL is intuitive for Prometheus users.
Need Help with Implementation?¶
Our team has experience designing and implementing modern architectures. We’re happy to help.