ungleich-k8s/prometheus-monitoring/alertmanager-config.yaml

33 lines
809 B
YAML
Raw Normal View History

2022-10-18 14:57:09 +00:00
apiVersion: monitoring.coreos.com/v1alpha1
kind: AlertmanagerConfig
metadata:
name: config-example
labels:
alertmanagerConfig: example
spec:
route:
groupBy: ['alertname', 'job']
groupWait: 30s
groupInterval: 1m
repeatInterval: 3h
receiver: 'slack-monitoring'
receivers:
- name: 'slack-monitoring'
slackConfigs:
- channel: '#devops-monitoring'
title: "K8S {{ range .Alerts }}{{ .Annotations.summary }}\n{{ end }}"
text: "K8S {{ range .Alerts }}{{ .Annotations.description }}\n{{ end }}"
sendResolved: true
apiURL:
name: 'slackapisecret'
key: 'url'
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: slackapisecret
stringData:
url: 'https://hooks.slack.com/services/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'