Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 17s
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
apiVersion: monitoring.coreos.com/v1alpha1
|
|
kind: AlertmanagerConfig
|
|
metadata:
|
|
name: telegram
|
|
labels:
|
|
alertmanager: main
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "1"
|
|
spec:
|
|
route:
|
|
groupBy: [namespace, alertname]
|
|
groupWait: 30s
|
|
groupInterval: 5m
|
|
repeatInterval: 12h
|
|
receiver: telegram
|
|
routes:
|
|
- receiver: "null"
|
|
matchers:
|
|
- name: alertname
|
|
value: Watchdog|InfoInhibitor
|
|
matchType: =~
|
|
receivers:
|
|
- name: telegram
|
|
telegramConfigs:
|
|
- botToken:
|
|
name: alertmanager-telegram
|
|
key: bot-token
|
|
# Telegram chat IDs are routing identifiers rather than credentials;
|
|
# AlertmanagerConfig only supports an integer here, not a Secret ref.
|
|
chatID: 124317807
|
|
sendResolved: true
|
|
message: |-
|
|
{{ if eq .Status "firing" }}🔥 FIRING{{ else }}✅ RESOLVED{{ end }}
|
|
{{ range .Alerts }}
|
|
{{ .Labels.alertname }} ({{ .Labels.severity }})
|
|
{{ if .Annotations.summary }}{{ .Annotations.summary }}{{ end }}
|
|
{{ if .Annotations.description }}{{ .Annotations.description }}{{ end }}
|
|
{{ if .Labels.namespace }}Namespace: {{ .Labels.namespace }}{{ end }}
|
|
{{ if .Labels.pod }}Pod: {{ .Labels.pod }}{{ end }}
|
|
{{ if .Labels.node }}Node: {{ .Labels.node }}{{ end }}
|
|
{{ .GeneratorURL }}
|
|
{{ end }}
|
|
- name: "null"
|