Compare commits

..

No commits in common. "94c2a34aac7c478a7e4dd2850ba3c12bd7d6f222" and "80f5a5daa218987d23a2b25ddd80775a7c9d4c3c" have entirely different histories.

2 changed files with 1 additions and 53 deletions

View file

@ -1,15 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: templates
namespace: prometheus
data:
telegram.tmpl: |-
{{ define "telegram.aaron" }}
{{ range .Alerts }}
{{ if eq .Status "firing"}}🔥 <b>{{ .Labels.alertname }}</b> 🔥{{ else }}✅ <b>{{ .Labels.alertname }}</b> ✅{{ end }}
<b> {{ .Annotations.summary }} </b>
{{ .Annotations.description }}
{{ end }}
{{ end }}

View file

@ -1,10 +1,6 @@
alertmanager:
alertmanagerSpec:
replicas: 2
secrets:
- "telegram-api"
configMaps:
- "templates"
storage:
volumeClaimTemplate:
spec:
@ -12,40 +8,7 @@ alertmanager:
resources:
requests:
storage: 5Gi
useExistingSecret: false
config:
global:
resolve_timeout: 5m
templates:
- '/etc/alertmanager/configmaps/*.tmpl'
route:
group_by: ['alertname']
group_wait: 30s
group_interval: 30s
repeat_interval: 24h
receiver: 'tg1'
routes:
- matchers:
- severity=warning
receiver: 'tg1'
- matchers:
- severity=critical
receiver: 'tg1'
receivers:
- name: tg1
telegram_configs:
- bot_token_file: '/etc/alertmanager/secrets/api_key'
chat_id: -995270884
api_url: "https://api.telegram.org"
send_resolved: true
parse_mode: "HTML"
message: '{{ template "telegram.aaron" .}}'
inhibit_rules:
- source_matchers:
- severity = critical
target_matchers:
- severity = warning
equal: ['alertname', 'server', 'instance']
useExistingSecret: true
ingress:
paths:
- /