69 lines
3.0 KiB
Django/Jinja
69 lines
3.0 KiB
Django/Jinja
# The root route on which each incoming alert enters.
|
|
route:
|
|
group_by: ["alertname", "job"]
|
|
group_wait: 20s
|
|
group_interval: 5m
|
|
repeat_interval: 3h
|
|
receiver: discord_webhook
|
|
|
|
receivers:
|
|
- name: "discord_webhook"
|
|
discord_configs:
|
|
- webhook_url: "{{ alertmanager_discord_webhook }}"
|
|
{# - send_resolved: true#}
|
|
{# username: 'Alertmanager'#}
|
|
{# webhook_configs:#}
|
|
{# - send_resolved: true#}
|
|
{# url: '{{ alertmanager_discord_webhook }}'#}
|
|
{# username: 'Alertmanager'#}
|
|
{# icon_url: 'https://prometheus.io/assets/icon.png'#}
|
|
{# icon_emoji: ':alert:'#}
|
|
{# send_resolved: true#}
|
|
{# text: "{{ .CommonAnnotations.summary }}"#}
|
|
{# title: "{{ .CommonLabels.alertname }}"#}
|
|
{# color: '{{ if eq .Status "firing" }}#FF0000{{ else }}#00FF00{{ end }}'#}
|
|
{# footer: '{{ .CommonLabels.monitor }}'#}
|
|
{# footer_icon: 'https://prometheus.io/assets/icon.png'#}
|
|
{# actions:#}
|
|
{# - type: 'button'#}
|
|
{# text: 'Open in Grafana'#}
|
|
{# url: '{{ .ExternalURL }}'#}
|
|
{# style: 'primary'#}
|
|
{# send_resolved: true#}
|
|
{# confirm:#}
|
|
{# title: 'Are you sure?'#}
|
|
{# text: 'This will open Grafana in a new tab.'#}
|
|
{# ok_text: 'Yes'#}
|
|
{# dismiss_text: 'No'#}
|
|
{# fields:#}
|
|
{# - title: 'Description'#}
|
|
{# value: "{{ .CommonAnnotations.description }}"#}
|
|
{# short: false#}
|
|
{# - title: 'Details'#}
|
|
{# value: "{{ .CommonAnnotations.details }}"#}
|
|
{# short: false#}
|
|
{# - title: 'Severity'#}
|
|
{# value: '{{ if eq .Labels.severity "critical" }}Critical{{ else if eq .Labels.severity "warning" }}Warning{{ else }}Info{{ end }}'#}
|
|
{# short: true#}
|
|
{# - title: 'Host'#}
|
|
{# value: '{{ .CommonLabels.monitor }}'#}
|
|
{# short: true#}
|
|
{# - title: 'Starts At'#}
|
|
{# value: '{{ .StartsAt.Format "2006-01-02 15:04:05" }}'#}
|
|
{# short: true#}
|
|
{# - title: 'Ends At'#}
|
|
{# value: '{{ .EndsAt.Format "2006-01-02 15:04:05" }}'#}
|
|
{# short: true#}
|
|
{# - title: 'Runbook'#}
|
|
{# value: '{{ .CommonAnnotations.runbook_url }}'#}
|
|
{# short: true#}
|
|
{# - title: 'Dashboard'#}
|
|
{# value: '{{ .CommonAnnotations.dashboard_url }}'#}
|
|
{# short: true#}
|
|
{# - title: 'Alerting Rule'#}
|
|
{# value: '{{ .CommonLabels.alertname }}'#}
|
|
{# short: true#}
|
|
{# - title: 'Alerting Rule Description'#}
|
|
{# value: '{{ .CommonLabels.alertname }}'#}
|
|
{# short: true#}
|