Feature Request: PagerDuty source field (PD-CEF)
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:
- Introduce a new
sourceconfiguration field (templated). - Use
clientas the default value forsource, for backwards compatibility.
-
Alertmanager version: v0.24.0
-
Alertmanager configuration file:
receivers:
- name: example
pagerduty_configs:
- routing_key: ...
client: Alertmanager
source: "{{ .CommonLabels.hostname }}"