Hi,
I have set up dynamic notifications via Events API v2 for a service, and I noticed that an alert labeled severity=critical
was routed as Low-priority instead of High, which was the desired routing.
Alert labels (from Incidents):
Labels:
- alertname = TestAlert
- alertgroup = TestGroup
- environment = prod
- instance = watcher:13408
- job = test_job
- monitor = default-monitor
- severity = critical
I am using AlertManager with the following config:
pagerduty_configs:
- routing_key: routing-key
send_resolved: true
severity: '{{ template "template.pagerduty.severity" }}'
{{ define "template.pagerduty.severity" -}}
{{- if .Labels.severity }}
{{ .Labels.severity }}
{{- else -}}
warning
{{- end }}
{{- end }}
I have also checked that urgency mapping for critical
is High.