Browse Source

Fix fixing-template for matrix-alertmanager-receiver to also consider the `alertname` annotation

My alerts seem to contain `annotations.alertname` in the payload, so the
default configuration (coming from the matrix-alertmanager-receiver README)
seems to be outdated or something.
pull/3408/head
Slavi Pantaleev 1 year ago
parent
commit
c044c815bc
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      roles/custom/matrix-alertmanager-receiver/defaults/main.yml

+ 6
- 1
roles/custom/matrix-alertmanager-receiver/defaults/main.yml View File

@@ -205,7 +205,12 @@ matrix_alertmanager_receiver_config_templating_firing_template: |-
# Controls the `templating.resolved-template` configuration setting.
matrix_alertmanager_receiver_config_templating_resolved_template: |-
{% raw %}
<strong><font color="{{ .ComputedValues.color }}">{{ .Alert.Status | ToUpper }}</font></strong>{{ .Alert.Labels.name }}
<strong><font color="{{ .ComputedValues.color }}">{{ .Alert.Status | ToUpper }}</font></strong>
{{ if .Alert.Labels.name }}
{{ .Alert.Labels.name }}
{{ else if .Alert.Labels.alertname }}
{{ .Alert.Labels.alertname }}
{{ end }}
{% endraw %}

# Default matrix-alertmanager-receiver configuration template which covers the generic use case.


Loading…
Cancel
Save