Propagate ACKs from PagerDuty to Centreon.
This is a reimplementation of pd-nag-connector in PHP, targeting Centreon, with additional features.
By using Transatel/api-centreon-notification-helper, we can send acks / unacks to any service even in a multi-poller architecure.
The code is compatible with both PagerDuty Webhooks API v1 and v2.
The username as well as the channel (website
or mobile
) will be extracted from the webhook request and used to compose the ack message in Centreon:
Acknowledged by <USER> (via PagerDuty - <CHANNEL>)
Before ack'ing / deack'ing, we test the state the service / host to ensure that we don't trigger a loop in case of a bi-directional integration between Centreon and PagerDuty.
The configuration is at the top of the pagerduty.php file.
Here is the bare minimum you need to configure:
Key | Description |
---|---|
NOTIF_HELPER_API_URL | URL to access Transatel/api-centreon-notification-helper |
Additionally, you can play with the following:
Key | Description |
---|---|
UNACK_ON_RESOLVE | If true unacks when receiving an incident.resolve |
IS_STICKY | Does ack stay on status change. Either NAGIOS_STICKY_YES or NAGIOS_STICKY_NO |
DO_NOTIFY | Do we notify on ack. Either NAGIOS_NOTIFY_YES or NAGIOS_NOTIFY_NO |
IS_PERSISTENT | Is ack persistent bewteen poller reboots. Either NAGIOS_PERISTENT_YES or NAGIOS_PERISTENT_NO |
DEFAULT_ACK_USERNAME | Fallback username to put in ACK message |