pagerduty_ack_to_nagios

File List
Login

The union of all files from all check-ins in the top-level directory


pd_ack_to_nagios_ack_poller.pl

To compliment https://github.com/PagerDuty/pagerduty-nagios-pl

pagerduty_nagios.pl does a good job of getting Nagios events into pagerduty. This script provides the reverse for a more complete experience.

This script polls PagerDuty for new events since the last poll, checks whether they are acks or resolves, and if so applies those to their corresponding Nagios alerts. i.e., If you ack in PagerDuty via SMS, Web UI, or the phone app that ack will find its way back to your Nagios instance.

Requirements

Both of these modules are found in CPAN and in your OS's package manager:

RHEL

FreeBSD

Setup

Simply set up a cron like so:

* * * * * nagios /usr/local/bin/pd_ack_to_nagios_ack_poller.pl -p [my_pagerduty_token]

Note, this will generally need to be run as the nagios user so that it has write access to the nagios command pipe.

This version of the script supports PagerDuty's APIv2 required as of Feburuary 6, 2018