> it doesn't show the expected result
What result *does* it show, and how does it differ from what you expect?
I suggest you first start by making a template that generates a dummy
message, like "Hello". Once you know how to make your template replace the
default one, then start adding to it field by field.
On Sunday, 11 June 2023 at 23:31:19 UTC+1 SysAdmin EM wrote:
> 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/f212d821-56f3-411c-a509-2b931b0f7fe4n%40googlegroups.com.