Alerts Email subject Notification

29 views
Skip to first unread message

Nitya Sree

unread,
Sep 10, 2022, 9:42:13 AM9/10/22
to Prometheus Users
Hi all,

Currently i added Subject header in receiver configuration as [{{ .Status | toUpper }}] and the alerts are firing as [FIRING] and [RESOLVED] in email notification subject
Now we got a requirement as [1 – Firing , 1 – Resolved ]. Can anyone please help me out here.

Thanks

Julius Volz

unread,
Sep 11, 2022, 8:55:59 AM9/11/22
to Nitya Sree, Prometheus Users
Hi,

You should be able to access the counts of firing and resolved alerts separately using "{{ .Alerts.Firing | len }}" and "{{ .Alerts.Resolved | len }}". So something like:

    [{{ .Alerts.Firing | len }} – Firing, {{ .Alerts.Resolved | len }} – Resolved]

Regards,
Julius

--
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 prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/6f076888-96a2-4409-8c31-7e40f3992ee5n%40googlegroups.com.


--
Julius Volz
PromLabs - promlabs.com
Reply all
Reply to author
Forward
0 new messages