pagerduty-events-apiv2.lua). It sends host and service state changes as PagerDuty Events API v2 JSON to the address set in the http_server_url parameter, which defaults to https://events.pagerduty.com/v2/enqueue. The Flashduty PagerDuty integration accepts this format, so no separate Centreon integration is needed: create a PagerDuty integration in Flashduty and put its push URL into the connector’s http_server_url.
In Flashduty On-call
Get an integration push URL in either of the two ways below. Choose the PagerDuty integration type in both, not Centreon.
Use a dedicated integration
- In the Flashduty console, go to Channels and open a channel
- Go to Settings → Integrations → Dedicated integrations and click Add an integration
- Select PagerDuty and click Save
- Open the generated integration card and copy the Push URL, in the form
https://api.flashcat.cloud/event/push/alert/pagerduty?integration_key=<integration key>
Use a shared integration
- In the Flashduty console, go to Integration Center → Alert Events
- Select PagerDuty and enter an integration name
- Configure the default route and select a channel; you can add more rules under Routes after creation
- Click Save and copy the generated Push URL
Configure in Centreon
Step 1: Install the stream connector
On the server that will send the data (central server, remote server or poller), run as root:Step 2: Configure the Broker output
- On the central server, go to Configuration → Pollers → Broker configuration and click
central-broker-master(choose the matching Broker configuration if a remote server or poller sends the events) - On the Output tab, select Generic - Stream connector and click Add to add an output
- Fill in the fields as follows:
- Click +Add a new entry below the Filter category table to add these parameters:
- Deploy the configuration and restart
centengineon all pollers:
integration_key query parameter as well as routing_key in the request body; filling in both parameters above lets the connector’s requests pass authentication. Keep max_buffer_size at its default so the connector sends one event per request.
Step 3: Verify
Following the Centreon documentation, you can send a test event with curl from the connector’s server, using the integration key asrouting_key and the Flashduty push URL as the address:
event_action set to resolve and the alert recovers.
Field mapping
How the fields sent by the Centreon connector (see the connector source) map to Flashduty:
Severity set by the connector for each Centreon state:
Recovery and deduplication
- A host or service always uses the same Alert Key, so a change from WARNING to CRITICAL updates the same alert and a return to OK or UP recovers it
- With the connector library’s default parameters only HARD states are sent, and objects that are acknowledged or in scheduled downtime are not sent; to change this, adjust
hard_only,acknowledgedandin_downtimein the connector parameters - To push only some objects, use the connector’s filter parameters such as
accepted_hostgroups,accepted_servicegroupsandaccepted_pollers
Troubleshooting
- Flashduty receives no alert: check
/var/log/centreon-broker/pagerduty-events.log(the default log file;log_levelgoes up to 3); confirmhttp_server_urlis the full push URL andpdy_routing_keyis set - The connector log shows a failed POST: the connector only treats HTTP 202 as success, and Flashduty answers PagerDuty Events API v2 requests with 202; for other status codes, check that
integration_keyis correct - The alert does not recover: confirm the recovery states (service OK, host UP) are not excluded by filter parameters such as
service_statusorhost_status - No alert for acknowledged objects:
acknowledgeddefaults to 0, so acknowledged problems are not pushed