prometheus / prometheus/alertmanager

AlertManager doesn't send some of alerts to Pagerduty

Open
#3,902 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/support
Dominant language
Go
Stars
8.6k
Forks
2.5k
Avg merge
2d 6h
Merged PRs (30d)
61

Description

I got those erros on some of alerts in alertmanger

ts=2024-06-26T14:45:32.988Z caller=dispatch.go:353 level=error component=dispatcher msg="Notify for alerts failed" num_alerts=3 err="pagerduty-notifications/pagerduty[0]: notify retry canceled due to unrecoverable error after 1 attempts: unexpected status code 400: Event object is invalid: 'payload.severity' is invalid (must be one of the following: 'critical', 'warning', 'error' or 'info')"
Because log doesn't say which alert are problematic, for compering I will show screenshot from pagerduty and alertmanager UI

Screenshot from 2024-06-26 16-55-09

Screenshot from 2024-06-26 16-57-32

Like you see CPUThrottlingHigh and KubePersistentVolumeFillingUp didn't show up in PD

Those are all alerts from alertmanager api: alerts.json
Log is saying that severity is invalid, but all alerts have correct values of severity.

Currently I'm using kube-prometheus-stack in version: 60.2.0, so alert manger version is: quay.io/prometheus/alertmanager:v0.27.0

Alertmanger logs with debug enabled:
alertmanager.log

My alertmanager config:

global:
  resolve_timeout: 1m
route:
  receiver: pagerduty-notifications
  group_by:
  - alertname
  routes:
  - receiver: "null"
    matchers:
    - alertname =~ "InfoInhibitor|Watchdog"
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 10m
inhibit_rules:
- target_matchers:
  - severity =~ warning|info
  source_matchers:
  - severity = critical
  equal:
  - namespace
  - alertname
- target_matchers:
  - severity = info
  source_matchers:
  - severity = warning
  equal:
  - namespace
  - alertname
- target_matchers:
  - severity = info
  source_matchers:
  - alertname = InfoInhibitor
  equal:
  - namespace
  - alertname
receivers:
- name: "null"
- name: pagerduty-notifications
  pagerduty_configs:
  - send_resolved: true
    routing_key: key
    severity: '{{ range .Alerts }}{{ .Labels.severity | toLower }}{{ end }}'
templates:
- /etc/alertmanager/config/*.tmpl

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached alertmanager.log, alerts.json, and the provided PagerDuty receiver configuration, focusing on how grouped alert severities are sent. Compare the failing group with the individual alert labels and determine what behavior should let every valid alert reach PagerDuty without an invalid severity error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.