Просмотр исходного кода

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 год назад
Родитель
Сommit
c044c815bc
1 измененных файлов: 6 добавлений и 1 удалений
  1. +6
    -1
      roles/custom/matrix-alertmanager-receiver/defaults/main.yml

+ 6
- 1
roles/custom/matrix-alertmanager-receiver/defaults/main.yml Просмотреть файл

@@ -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.


Загрузка…
Отмена
Сохранить