On 7/16/20 11:51 PM, 'a z' via Prometheus Users wrote:
> I am unsure how within Prometheus/Alertmanager templating how I can
> check if one of the alert labels has a certain value.
In Alertmanager templates, you can use Go's template syntax which allows
for the "eq" function. You can see an example here:

https://github.com/prometheus/alertmanager/blob/master/template/default.tmpl#L4

If you are grouping by this label, you can access it using .GroupLabels:

https://prometheus.io/docs/alerting/latest/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/250e788c-11ad-d1e8-cf06-2d0aea65d226%40hoffmann-christian.info.

Reply via email to