I have read the documentation and tried to create a template with this
code, but it doesn't show the expected result.

{{ define "sns.default.message" }}
    {{- $status := .Status -}}
    {{- if eq $status "firing" -}}
    Alert: {{ .Labels.alertname }}
    Cluster: {{ .Labels.cluster }}
    Value: {{ printf "%.2f" .Annotations.current_value }}
    {{- else if eq $status "resolved" -}}
    OK
    {{- end -}}
    {{- end }}

Is there someone with more experience who can help me?

-- 
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/CAGUDtnm-d_-djYenM2d5en5q2C95Y%2B9NUttzKog0qdBL2pUaaQ%40mail.gmail.com.

Reply via email to