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.

On Wed, 4 Nov 2020 at 17:20, 'Ed Welch' via Prometheus Developers <
[email protected]> wrote:

>
> 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
>
> [1]
> https://github.com/prometheus/alertmanager/blob/0c0c6bdb0133e399c1a9fe4c1a170ce49ec67b58/dispatch/dispatch.go#L138
> [2]
> https://github.com/prometheus/alertmanager/blob/f10e5cb703616584f9772966589e2060db5daf34/vendor/github.com/prometheus/common/model/alert.go#L55
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-developers/7332de62-bd64-4c5e-889e-69d8b4421d13n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-developers/7332de62-bd64-4c5e-889e-69d8b4421d13n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/CAOs1UmzHZf4%3DiK08YBvk9R23kbb_aguL1NzLy1yPSsO8SGRegQ%40mail.gmail.com.

Reply via email to