Skip to content

Instantly share code, notes, and snippets.

@spadger
Forked from l13t/values.yaml
Last active February 19, 2021 16:16
Show Gist options
  • Save spadger/e703f33cbaaddb5eee594ebb31f4629f to your computer and use it in GitHub Desktop.
Save spadger/e703f33cbaaddb5eee594ebb31f4629f to your computer and use it in GitHub Desktop.
alertmanager alerts to slack for prometheus-operator
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