Hi everyone,
I have been modifying the “ng_alert_notification.html” file in order to send custom email alerts upon the creation of my alert rules. However, I would like to know whether it is possible to extract only the labels when using {{ .ValueString }}.
I tried different combinations but none of them are working…
1) First example:
{{with $values.B.Value }
{{ range $k, $v := . }}
{{ . | reReplaceAll metric='.*' value={.*} labels=
“”}}
{{end}}
{{end}}
2) Second example:
{{with .ValueString}}
{{ . | reReplaceAll metric='.*' value={.*} labels=
“”}}
{{end}}
Here is an example of the metric label I want to display:
Thanks in advance for your help !