Alertmanager stdout notifier (or tweak some debug logs)

22 views
Skip to first unread message

Ed Welch

unread,
Nov 4, 2020, 11:20:16 AM11/4/20
to Prometheus Developers

Hey folks! Looking for some feedback on a potential solution for a problem I would like to solve:

I would like to capture all the alerts being sent via alertmanager via the logger into my logging system so that I can do some analytics on alerts and frequency after the fact.

Currently, the debug level logging in the dispatch.go for alerts will log the alert as it's processed [1]

However the Stringer method for the Alert type only includes the alert name and the fingerprint of the labels [2]. I really need the printed labels for the log line to be useful for the purpose I'm seeking.

I have 2 thoughts:
- would the project be receptive to changing this Stringer method to also include the full label list?
- as an alternative would something like a stdout notifier be considered for inclusion in the alertmanager?

For the second case I'm thinking a very simple notifier which just prints the alert to stdout, perhaps with some basic options for controlling the format.

Thoughts?

Thanks,
Ed

Frederic Branczyk

unread,
Nov 4, 2020, 11:26:31 AM11/4/20
to Ed Welch, Prometheus Developers
On debug log level, I don't see why we wouldn't add it to the stringer method. I feel this is useful debugging context, so I'd be happy to have this.

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/7332de62-bd64-4c5e-889e-69d8b4421d13n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages