Skip to content

Instantly share code, notes, and snippets.

@gmas
Created January 16, 2020 20:21
Show Gist options
  • Save gmas/e6e97ddb9aa708187555c37d0c967657 to your computer and use it in GitHub Desktop.
Save gmas/e6e97ddb9aa708187555c37d0c967657 to your computer and use it in GitHub Desktop.
route:
group_by: ['alertname']
group_wait: 500ms
group_interval: 500ms
repeat_interval: 1h
routes:
- match:
severity: alert
receiver: 'slack-alerts'
repeat_interval: 15m
- match:
severity: profiling
receiver: 'webhook-alerts'
repeat_interval: 5m
receivers:
- name: 'slack-alerts'
slack_configs:
- channel: '#infra-gateway-alerts'
text: "{{ range .Alerts }}*Alert:* {{ .Annotations.description }}\n{{ end }}"
title: '[{{ .Alerts.Firing | len }} Firing] {{ .CommonAnnotations.severity }} {{ .GroupLabels.alertname }}'
send_resolved: true
- name: 'webhook-alerts'
webhook_configs:
# Whether or not to notify about resolved alerts.
- send_resolved: false
# The endpoint to send HTTP POST requests to.
url: http://localhost:9096
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment