Loki¶
Loki alerting¶
How to alert when there's an error in the logs
- https://grafana.com/docs/loki/latest/alerting/
- https://www.youtube.com/watch?v=GdgX46KwKqo
- https://grafana.com/docs/loki/latest/alerting/
- https://www.infracloud.io/blogs/grafana-loki-log-monitoring-alerting/
Configure grafana¶
https://grafana.com/docs/grafana/latest/features/datasources/loki/
URL: http://loki-stack.logging.svc.cluster.local:3100
Test query:
Logcli¶
Install¶
or via GitHub releases:
Setup¶
Optional: If loki is username/password protected export the grafana/loki admin credentials:
Query exaples¶
Show all logs:
From https://stackoverflow.com/a/70904375:
Due to Loki’s design, all LogQL queries must contain a log stream selector.
Search for regex:
Show log entries over time: