32 lines
809 B
YAML
32 lines
809 B
YAML
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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'
|