AlertManager - alerts based on logged messages to the alert log

16 views
Skip to first unread message

Dimuthu de Silva

unread,
Jun 24, 2020, 4:31:32 PM6/24/20
to promethe...@googlegroups.com
Hi,
Is there a way to send alerts on alertmanager based on a non-prometheus based metrics such as reading from a log file? (Sending alerts when a error is logged)

Thanks in advance :)

Brian Candler

unread,
Jun 25, 2020, 1:18:15 AM6/25/20
to Prometheus Users
"mtail" and "grok_exporter" can be used to turn logs into metrics, by counting lines that match a pattern.  You can scrape these with Prometheus and alert on them as normal.

"loki" is a log storage engine which has a LogQL language similar to PromQL, and will soon be gaining the ability to alert on them:

Think carefully about what actual alerts you want to send out and when:

Reply all
Reply to author
Forward
0 new messages