update alertmanager config

This commit is contained in:
icecheng 2025-09-24 17:18:18 +08:00
parent e5a9ceb5df
commit 49f08e26f1

View File

@ -37,16 +37,21 @@ spec:
sendResolved: true
headers:
- key: Subject
value: '🚨Freeleaps Alert: {{ .CommonAnnotations.summary }}'
value: '{{ if eq .Status "firing" }}🚨 Freeleaps Alert: {{ .CommonAnnotations.summary }}{{ else }}✅ Freeleaps Resolved: {{ .CommonAnnotations.summary }}{{ end }}'
html: |-
<h3><strong>{{ if eq .Status "firing" }}🚨 Alert: {{ .CommonAnnotations.summary }}{{ else }}✅ Resolved: {{ .CommonAnnotations.summary }}{{ end }}</strong></h3>
<p><strong>📝 AlertName:</strong> {{ .CommonLabels.alertname }}</p>
<p><strong>🔧 Service:</strong> {{ .CommonLabels.service }}</p>
<p><strong>🔧 Pod:</strong> {{ .CommonLabels.pod }}({{ .CommonLabels.instance }})</p>
<p><strong>🏷️ Severity:</strong> {{ .CommonLabels.severity }}</p>
<p><strong>{{ if eq .Status "firing" }}🔴 Status:{{ else }}🟢 Status:{{ end }}</strong> {{ .Status | toUpper }}</p>
<p>📝 Description: {{ .CommonAnnotations.description }}</p>
<p>{{ if eq .Status "firing" }}🔴 Status: {{ .Status | toUpper }}{{ else }}🟢 Status: {{ .Status | toUpper }}{{ end }}</p>
<p>📖 Runbook: <a href="{{ .CommonAnnotations.runbook_url }}">{{ .CommonAnnotations.runbook_url }}</a></p>
name: email
route:
groupBy:
- severity
groupInterval: 30s
groupInterval: 5m
receiver: email
groupWait: 30s
repeatInterval: 1m
groupWait: 5m
repeatInterval: 6h