- PagerDuty /
- Integrations /
- Zenoss 3 Integration Guide
Zenoss 3 Integration Guide
Looking for Zenoss 5? Go here
Looking for Zenoss 4? Go here
Setting up the PagerDuty / Zenoss 3 integration
In PagerDuty
-
From the Configuration menu, select Services.
-
On your Services page: If you are creating a new service for your integration, click +Add New Service. If you are adding your integration to an existing service, click the name of the service you want to add the integration to. Then click the Integrations tab and click the +New Integration button.
-
Select your app from the Integration Type menu and enter an Integration Name. If you are creating a new service for your integration, in General Settings, enter a Name for your new service. Then, in Incident Settings, specify the Escalation Policy, Notification Urgency, and Incident Behavior for your new service.
-
Click the Add Service or Add Integration button to save your new integration. You will be redirected to the Integrations page for your service.
In Zenoss:
-
Install cURL and its dependencies on the machine running Zenoss (if not installed already):For Debian, Ubuntu, and other Debian-derived systems:
RHEL, Fedora, CentOS, and other Redhat-derived systems:sudo aptitude install curl
sudo yum install curl
-
Log into your Zenoss Console
-
Click on the Events tab
-
Click on the Event Manager sub-tab
-
Click on the Commands link on the left panel
-
Add a new command by entering the name “PagerDuty” and then click the Add button
-
Click on the “PagerDuty” command to view the command details
-
Enable the command by selecting “True” for the label titled “Enabled”
-
Copy and paste the following into the field labeled “Command”:
NOTE: PagerDuty does not accept invalid JSON including unescaped newline characters. Please verify within your Zenoss configuration that no Zenoss variables contain invalid JSON data.curl -H "Content-Type: application/json" -X POST -d '{"service_key": "YOUR-SERVICE-KEY", "incident_key": "${evt/evid}", "event_type": "trigger", "description": "${evt/device}: ${evt/summary}", "details": { "device": "${evt/device}", "ipAddress": "${evt/ipAddress}", "severity": "${evt/severity}", "summary": "${evt/summary}", "message": "${evt/message}", "evid": "${evt/evid}"} }' https://events.pagerduty.com/generic/2010-04-15/create_event.json
-
Replace YOUR-SERVICE-KEY with the key from PagerDuty
-
Copy and paste the following into the field labeled “Clear Command”:
curl -H "Content-Type: application/json" -X POST -d '{"service_key": "YOUR-SERVICE-KEY", "incident_key": "${evt/evid}", "event_type": "resolve"}' https://events.pagerduty.com/generic/2010-04-15/create_event.json
-
Replace YOUR-SERVICE-KEY with the key from PagerDuty
-
Click on the “Save” button at the bottom to save the changes
FAQ
What if a Zenoss event happens while my network is down?
At the moment, if the event command fails to submit notifications to PagerDuty, it will be registered as another event in Zenoss. The repeat time can be set in command settings such that notification would be retried. Note: PagerDuty will deduplicate events based on the event id, thus only one PagerDuty incident would be created even if Zenoss submits events multiple times.You should also configure an external ping check service to monitor your site’s external connectivity. Of course, you can use PagerDuty to forward alerts from these services as well.How do I setup Zenoss to work with multiple PagerDuty integrations?
This is easy to do with the current integration, as a Zenoss integration in PagerDuty is directly mapped to an “Event Command” in Zenoss.In order to setup multiple integrations, just duplicate the existing event command rename it (i.e. pagerduty_database, pagerduty_network, etc.) and update the command with the appropriate integration key. Don’t forget to set filters on the command such that only the desired events are sent to PagerDuty.Ready to get started?
Try any product on the Operations Cloud for free.
No credit card required.