Thanks a lot, I'll look into templates details. EZHILARASAN Karthike
Le mardi 25 février 2020 10:55:44 UTC+1, Christian Hoffmann a écrit : > > Hi, > > On 2/25/20 10:42 AM, Karthike Ezhilarasan wrote: > > I've recently configured prometheus and alertmanager with a slack > > webhook, everything works fine but the notifications I get in slack uses > > the same text for firing and resolved making it look a bit odd. > > > > [FIRING:1] warning@my_server high_storage_load > > warning@my_server: Host storage usage is 81%. > > > > > > > > [RESOLVED] high_storage_load@my_server > > Resolved@my_server: Host storage usage is 81%. > > > > > > I would like to know if there is a simple way to use 2 different text > > fields one for firing messages and one for resolved messages. > > Yes, you can use Alertmanager's notification templating feature to > format such messages differently, e.g. based on the Status field (firing > vs. resolved). You can add/change the static text or you could even > reference a different alert-specific annotation. > > I suggest starting based on the built-in defaults: > > https://prometheus.io/docs/alerting/configuration/#slack_config > > https://github.com/prometheus/alertmanager/blob/master/template/default.tmpl > https://prometheus.io/docs/alerting/notification_examples/ > https://prometheus.io/docs/alerting/notifications/ > > Kind regards, > Christian > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" 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-users/84d8b2fd-6dc0-4bd7-ad56-27ba07e382d8%40googlegroups.com.

