-
-
Save spadger/e703f33cbaaddb5eee594ebb31f4629f to your computer and use it in GitHub Desktop.
alertmanager alerts to slack for prometheus-operator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alertmanager: | |
## stuff here ## | |
config: | |
global: | |
slack_api_url: "https://hooks.slack.com/services/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" | |
route: | |
group_by: ['job'] | |
group_wait: 30s | |
group_interval: 5m | |
repeat_interval: 12h | |
routes: | |
- match: | |
receiver: 'slack' | |
continue: true | |
receivers: | |
- name: 'vg-slack' | |
slack_configs: | |
- channel: '#video-gamification-pod' | |
icon_emoji: ":prometheus:" | |
username: "Prometheus" | |
send_resolved: false | |
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification' | |
text: >- | |
{{ range .Alerts }} | |
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}` | |
*Description:* {{ .Annotations.description }} | |
*Details:* | |
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}` | |
{{ end }} | |
{{ end }} | |
## more config ## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment