alertmanager icon indicating copy to clipboard operation
alertmanager copied to clipboard

Feature Request: PagerDuty source field (PD-CEF)

Open EronWright opened this issue 3 years ago • 0 comments

What did you do? I would like to configure the PagerDuty receiver to set the Source field of the event, as per PD-CEF.

What did you expect to see? I expected to configure the source field independently of the client field.

What did you see instead? Under which circumstances? The source field is not directly configurable, however the client configuration field may be used to set the Source (code reference). However, the client field is also used to set the client parameter of the eventv2 message, and I want to have a different value for Client and Source.

Looking at the PagerDuty API Reference, the Client and Source have different purposes:

  • Client - The name of the monitoring client that is triggering this event (default: Alertmanager).
  • Source - The unique location of the affected system, preferably a hostname or FQDN.

Suggested Improvement My suggestion would be to:

  1. Introduce a new source configuration field (templated).
  2. Use client as the default value for source, for backwards compatibility.
  • Alertmanager version: v0.24.0

  • Alertmanager configuration file:

receivers:
  - name: example
    pagerduty_configs:
    - routing_key:  ...
      client: Alertmanager
      source: "{{ .CommonLabels.hostname }}"

EronWright avatar Sep 16 '22 18:09 EronWright