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 sendResolved: true
headers: headers:
- key: Subject - key: Subject
value: '🚨Freeleaps Alert: {{ .CommonAnnotations.summary }}' value: '{{ if eq .Status "firing" }}🚨 Freeleaps Alert: {{ .CommonAnnotations.summary }}{{ else }}✅ Freeleaps Resolved: {{ .CommonAnnotations.summary }}{{ end }}'
html: |- 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>📝 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> <p>📖 Runbook: <a href="{{ .CommonAnnotations.runbook_url }}">{{ .CommonAnnotations.runbook_url }}</a></p>
name: email name: email
route: route:
groupBy: groupBy:
- severity - severity
groupInterval: 30s groupInterval: 5m
receiver: email receiver: email
groupWait: 30s groupWait: 5m
repeatInterval: 1m repeatInterval: 6h