fix(infra-monitoring): alertmanager config adjust and make groupBy configurable

This commit is contained in:
WrenIX 2024-11-01 19:58:06 +01:00
parent 13b50792b9
commit de9e1d9dce
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
3 changed files with 27 additions and 13 deletions

View file

@ -110,16 +110,16 @@ image::https://img.shields.io/badge/Version-application-informational?style=flat
| `""`
|
| alertmanager.inhibitRules
| list
| `[]`
| additional inhibitRules
| alertmanager.receiver.customs
| object
| `{}`
| customs
| alertmanager.receiver.inhibitRules
| list
| `[]`
| additional inhibitRules
| alertmanager.receiver.matrix.default
| string
| `"!example-room:matrix.org"`
@ -200,12 +200,17 @@ image::https://img.shields.io/badge/Version-application-informational?style=flat
| `false`
|
| alertmanager.receiver.repeatInterval
| alertmanager.route.groupBy
| list
| `["namespace","alertname"]`
| groupBy
| alertmanager.route.repeatInterval
| string
| `"24h"`
| repeat Interval
| alertmanager.receiver.routes
| alertmanager.route.routes
| list
| `[]`
| would overwrite defaults (like ntfy or matrix) # send every alert to ntfy # (and continue to routing for that alert) - receiver: "ntfy-default" continue: true # send selected alerts to special matrix room # (and remove them for evaluation - no continue) - receiver: "matrix-room-name" matchers: - name: "team" matchType: "=" value: "room-name" # all reminig alerts to matrix default room - receiver: "matrix-default"

View file

@ -106,17 +106,19 @@ spec:
route:
groupWait: "30s"
groupInterval: "10m"
{{- with .Values.alertmanager.route.groupBy }}
groupBy:
- "namespace"
{{- toYaml . | nindent 6 }}
{{- end }}
receiver: "null"
repeatInterval: {{ .Values.alertmanager.receiver.repeatInterval }}
repeatInterval: {{ .Values.alertmanager.route.repeatInterval }}
routes:
- receiver: "null"
matchers:
- name: "alertname"
matchType: "=~"
value: "InfoInhibitor|Watchdog"
{{- with .Values.alertmanager.receiver.routes }}
{{- with .Values.alertmanager.route.routes }}
{{- toYaml . | nindent 6 }}
{{- end }}{{/* end-with routes */}}
- receiver: "default"

View file

@ -64,7 +64,10 @@ alertmanager:
anonymous:
enabled: false
receiver:
# -- additional inhibitRules
inhibitRules: []
route:
# -- would overwrite defaults (like ntfy or matrix)
# # send every alert to ntfy
# # (and continue to routing for that alert)
@ -80,10 +83,14 @@ alertmanager:
# # all reminig alerts to matrix default room
# - receiver: "matrix-default"
routes: []
# -- additional inhibitRules
inhibitRules: []
# -- groupBy
groupBy:
- namespace
- alertname
# -- repeat Interval
repeatInterval: "24h"
receiver:
# -- customs
customs: {}
matrix: