Using Grafana Loki 2.0 as an Alert Source
Blog post from ScyllaDB
Grafana Loki 2.0 introduces enhanced capabilities for log aggregation and alert generation within Grafana's ecosystem, with a focus on integrating with systems like ScyllaDB on AWS. The new release allows users to create custom alerts, similar to Prometheus, and sends them to Alertmanager for further processing, such as email or Slack notifications. The setup involves using rsyslog for log collection on reporting servers and promtail as an agent for log aggregation, which can be configured to receive logs via the Loki Push API or as a syslog target. Loki's query language, akin to Prometheus, supports creating alerts directly from log data, offering additional insights. The article describes setting up a monitoring stack with Grafana, Alertmanager, Loki, and promtail using Docker for simplicity, emphasizing low-cardinality labels for indexing and high-cardinality labels for query time. It suggests using minimal filtering initially to capture logs effectively, with the flexibility to refine filtering later. The integration allows users to visualize Loki metrics on Grafana dashboards, enhancing the ability to monitor and respond to system events in real-time.