feat: alert manager config update
This commit is contained in:
parent
90a9337f1a
commit
de23dff37e
@ -14,44 +14,17 @@ metadata:
|
||||
namespace: freeleaps-prod
|
||||
spec:
|
||||
receivers:
|
||||
# - msteamsConfigs:
|
||||
# - sendResolved: true
|
||||
# text: '{{ template "msteams.default.text" . }}'
|
||||
# title: >-
|
||||
# {{ if eq .Status "firing" }}🚨 [FIRING] 🔥{{- else -}}🙌 [RESOLVED]
|
||||
# 🍻{{- end -}}
|
||||
# webhookUrl:
|
||||
# key: webhook-url
|
||||
# name: freeleaps-teams-webhook
|
||||
# name: ms-teams
|
||||
- emailConfigs:
|
||||
- to: "1535145760@qq.com,icecheng@mathmast.com"
|
||||
from: "1535145760@qq.com"
|
||||
smarthost: "smtp.qq.com:465"
|
||||
authUsername: "1535145760@qq.com"
|
||||
authPassword:
|
||||
name: "altermanager-email-credentials"
|
||||
key: "password"
|
||||
authIdentity: "1535145760@qq.com"
|
||||
requireTLS: false
|
||||
sendResolved: true
|
||||
headers:
|
||||
- key: Subject
|
||||
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>📖 Runbook: <a href="{{ .CommonAnnotations.runbook_url }}">{{ .CommonAnnotations.runbook_url }}</a></p>
|
||||
name: email
|
||||
- name: freeleaps-admin-webhook
|
||||
webhookConfigs:
|
||||
- sendResolved: true
|
||||
url: >-
|
||||
http://freeleaps-admin-api-server.68d89eb31260178d24ac0da1-alpha.svc.freeleaps.cluster:8888/api/ale…
|
||||
route:
|
||||
groupBy:
|
||||
- severity
|
||||
groupInterval: 5m
|
||||
receiver: email
|
||||
groupWait: 5m
|
||||
repeatInterval: 6h
|
||||
- alertname
|
||||
- service
|
||||
groupInterval: 1m
|
||||
groupWait: 30s
|
||||
receiver: freeleaps-admin-webhook
|
||||
repeatInterval: 30m
|
||||
|
||||
Loading…
Reference in New Issue
Block a user