PagerDuty-OpenNMS is a script run by OpenNMS that calls the PagerDuty Integration API with curl.
The configuration itself is not overly complex:
- Place the attached script in $OPENNMS_HOME/contrib/pagerduty
- Change the API key from “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX” to the proper Service API Key (see below for instructions on how to add a service.)
- Make the script executable
- Add a notification command to $OPENNMS_HOME/etc/notificationCommands.xml calling the script. (There is an example in the script header)
- Restart OpenNMS and Log in
- Navigate to Admin->Configure Notifications->Destination Paths
- Select and Escalation and click “Edit”
- Select a target and click “Edit”
- Click “Next” after selecting users or groups
- Change the command for the target user to “PagerDuty” and click "Next"
- Click “Finish”
- Click "Services" in the menu bar.
- Click "+ Add New Service"
- Name your service and select an Escalation Policy
- Select "Use our API directly"
- Note: When using this script, do not specify OpenNMS under "Select a Tool." This will create an email-based integration--and thus fail to generate a Service API Key--because neither PagerDuty nor OpenNMS officially support this script.
This script was written by and provided courtesy of Kevin Sonney (ksonney) and is ©2014, Kevin Sonney. It is licensed under the AGPLv3.