58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
receivers:
|
|
- name: "null"
|
|
- name: "pushover"
|
|
pushover_configs:
|
|
- html: true
|
|
token_file: /etc/secrets/pushover_api_token
|
|
user_key_file: /etc/secrets/pushover_api_userkey
|
|
send_resolved: true
|
|
priority: |-
|
|
{{ if eq .Status "firing" }}1{{ else }}0{{ end }}
|
|
url_title: View in Alert Manager
|
|
title: |-
|
|
[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonLabels.alertname }}
|
|
message: |-
|
|
{{- range .Alerts }}
|
|
{{- if ne .Labels.severity "" }}
|
|
<b>Severity:</b> <i>{{ .Labels.severity }}</i>
|
|
{{- else }}
|
|
<b>Severity:</b> <i>N/A</i>
|
|
{{- end }}
|
|
{{- if ne .Annotations.description "" }}
|
|
<b>Description:</b> <i>{{ .Annotations.description }}</i>
|
|
{{- else if ne .Annotations.summary "" }}
|
|
<b>Summary:</b> <i>{{ .Annotations.summary }}</i>
|
|
{{- else if ne .Annotations.message "" }}
|
|
<b>Message:</b> <i>{{ .Annotations.message }}</i>
|
|
{{- else }}
|
|
<b>Description:</b> <i>N/A</i>
|
|
{{- end }}
|
|
{{- if gt (len .Labels.SortedPairs) 0 }}
|
|
<b>Details:</b>
|
|
{{- range .Labels.SortedPairs }}
|
|
• <b>{{ .Name }}:</b> <i>{{ .Value }}</i>
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
route:
|
|
group_by: ["alertname", "job"]
|
|
group_wait: 30s
|
|
group_interval: 5m
|
|
repeat_interval: 6h
|
|
receiver: "pushover"
|
|
routes:
|
|
- receiver: "null"
|
|
matchers:
|
|
- alertname =~ "InfoInhibitor|Watchdog"
|
|
- receiver: "pushover"
|
|
matchers:
|
|
- severity = critical
|
|
continue: true
|
|
|
|
inhibit_rules:
|
|
- source_matchers:
|
|
- severity = "critical"
|
|
target_matchers:
|
|
- severity = "warning"
|
|
equal: ["alertname", "namespace"]
|