Files of check-in [c6a769ab61] in the top-level directory
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.
- JSON module - https://github.com/makamaka/JSON
- WWW::Curl::Easy from WWW::Curl - https://github.com/szbalint/WWW--Curl
Both of these modules are found in CPAN and in your OS's package manager:
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