This is how message.tmpl within the container looks like:
root@calert-6b5574c764-mzq5z:/app# cat static/message.tmpl
*({{ .Labels.severity | toUpper }}) {{ .Labels.alertname | Title }} - {{ .Status | Title }}*
{{ range .Annotations.SortedPairs -}}
{{ .Name | Title }}: {{ .Value}}
{{ end -}}
The configmap :
Data
====
config.toml:
----
[app[]
address = "0.0.0.0:6000"
server_timeout = "60s"
enable_request_logs = true
log = "debug"
[providers.cp[]
type = "google_chat" # Type of provider. Currently supported value is `google_chat`.
endpoint = "<webhook>" # Google Chat Webhook URL
max_idle_conns = 50 # Max idle connections in the HTTP Client.
timeout = "30s" # Timeout for making requests to Provider.
template = "static/message.tmpl" # Path to specify the message template path.
thread_ttl = "12h" # Timeout to keep active alerts in memory. Once this TTL expires, a new thread will be created.
dry_run = true
message.tmpl:
----
*({{ .Labels.severity | toUpper }}) {{ .Labels.alertname | Title }} - {{ .Status | Title }}*
{{ range .Annotations.SortedPairs -}}
{{ .Name | Title }}: {{ .Value}}
{{ end -}}
BinaryData
====
Hi,
first of all thanks for this project!
I am trying to set this up in our cluster and get this error for my test alert:
This is how
message.tmpl
within the container looks like:The
configmap
:calert v2.0.4
Any hint is appreciated!