Change resolve message

This commit is contained in:
Magnus Root 2026-05-04 18:23:00 +03:00
parent f3a44cee99
commit ccb52e92b8

View file

@ -1610,6 +1610,6 @@
],
"contact_point": {
"receiver_name": "tg+mail+mattermost PTAF Grafana",
"message_template": "{{ range .Alerts }}{{ if eq .Status \"firing\" }}🔴 Firing{{ else }}✅ Resolved{{ end }}\n{{ if .Annotations.client_domain }}{{ if eq .Annotations.severity \"warning\" }}🟡 {{ .Annotations.client_domain }}{{ if index .Values \"_Reduce\" }} на WAF {{ index .Values \"_Reduce\" | printf \"%.0f\" }} {{ if .Annotations.value_unit }}{{ .Annotations.value_unit }}{{ end }}{{ end }} {{ if .Annotations.code_field }}{{ .Annotations.code_field }}{{ end }} кодов ответа {{ if .Annotations.field_info }}{{ .Annotations.field_info }}{{ end }}\n{{ if .Annotations.threshold_count }}Пороговое значение {{ .Annotations.threshold_count }}\n{{ end }}{{ else }}{{ if eq .Status \"firing\" }}🔴 {{ .Annotations.client_domain }} — {{ .Annotations.code_field }} ошибок > {{ .Annotations.threshold_value }}% держится > {{ .Annotations.for_duration }}.\nТекущее значение: {{ if index .Values \"Значение\" }}{{ index .Values \"Значение\" | printf \"%.2f\" }}%{{ end }}{{ if index .Values \"_Reduce\" }}{{ index .Values \"_Reduce\" | printf \"%.2f\" }}%{{ end }} {{ if .Annotations.field_info }}{{ .Annotations.field_info }}{{ end }}\n{{ else }}🔴 {{ .Annotations.client_domain }} — {{ .Annotations.code_field }} ошибок < {{ .Annotations.threshold_value }}%.\nТекущее значение: {{ if index .Values \"Значение\" }}{{ index .Values \"Значение\" | printf \"%.2f\" }}%{{ end }}{{ if index .Values \"_Reduce\" }}{{ index .Values \"_Reduce\" | printf \"%.2f\" }}%{{ end }} {{ if .Annotations.field_info }}{{ .Annotations.field_info }}{{ end }}\n{{ end }}{{ end }}{{ else }}{{ if .Annotations.summary }}{{ .Annotations.summary }}\n{{ end }}{{ end }}{{ if eq .Status \"firing\" }}Время сработки алерта: {{ .StartsAt.Format \"2006-01-02 15:04:05 UTC\" }}{{ else }}Время разрешения алерта: {{ .EndsAt.Format \"2006-01-02 15:04:05 UTC\" }}{{ end }}\n{{ if .Annotations.runbook }}\nНеобходимо {{ .Annotations.runbook }}\n{{ end }}{{ end }}"
"message_template": "{{ range .Alerts }}{{ if eq .Status \"firing\" }}🔴 Firing{{ else }}✅ Resolved{{ end }}\n{{ if .Annotations.client_domain }}{{ if eq .Annotations.severity \"warning\" }}🟡 {{ .Annotations.client_domain }} — {{ if .Annotations.code_field }}{{ .Annotations.code_field }}{{ end }} кодов ответа{{ if index .Values \"_Reduce\" }} на WAF {{ index .Values \"_Reduce\" | printf \"%.0f\" }} {{ if .Annotations.value_unit }}{{ .Annotations.value_unit }}{{ end }}{{ end }} {{ if .Annotations.field_info }}{{ .Annotations.field_info }}{{ end }}\n{{ if .Annotations.threshold_count }}Пороговое значение {{ .Annotations.threshold_count }}\n{{ end }}{{ else }}{{ if eq .Status \"firing\" }}🔴 {{ .Annotations.client_domain }} — {{ .Annotations.code_field }} ошибок > {{ .Annotations.threshold_value }}% держится > {{ .Annotations.for_duration }}.\nТекущее значение: {{ if index .Values \"Значение\" }}{{ index .Values \"Значение\" | printf \"%.2f\" }}%{{ end }}{{ if index .Values \"_Reduce\" }}{{ index .Values \"_Reduce\" | printf \"%.2f\" }}%{{ end }} {{ if .Annotations.field_info }}{{ .Annotations.field_info }}{{ end }}\n{{ else }}🔴 {{ .Annotations.client_domain }} — {{ .Annotations.code_field }} ошибок < {{ .Annotations.threshold_value }}%.\n{{ end }}{{ end }}{{ else }}{{ if .Annotations.summary }}{{ .Annotations.summary }}\n{{ end }}{{ end }}{{ if eq .Status \"firing\" }}Время сработки алерта: {{ .StartsAt.Format \"2006-01-02 15:04:05 UTC\" }}{{ else }}Время разрешения алерта: {{ .EndsAt.Format \"2006-01-02 15:04:05 UTC\" }}{{ end }}\n{{ if eq .Status \"firing\" }}{{ if .Annotations.runbook }}\nНеобходимо {{ .Annotations.runbook }}\n{{ end }}{{ end }}{{ end }}"
}
}