May 30, 2017
by Warren Van Winckel
We have updated the PagerDuty pack to use the “pypd” library, maintained by PagerDuty. Previously we were using the “pygerduty” library, maintained by DropBox. Key point to note is that “pygerduty” uses version 1 of the PagerDuty API, and “pypd” uses version 2.
We needed to update to v2 because PagerDuty will not be supporting version 1 of their API after July 6, 2017. As a consequence of the migration to the latest API, any existing Stackstorm and PagerDuty users should update their packs and configurations now. You will need to change the way some actions are called because the API has changed and some new parameters are required:
st2 run pagerduty.acknowledge_incident email=’’ ids=<incident-ids>
st2 run pagerduty.resolve_incident email=’’ ids=<incident-ids>
“<incident ids>” is a comma separated list of incident ids. Additionally, ensure the /opt/stackstorm/configs/pagerduty.yaml file looks similar to this:
api_key: T7-yQxyFzxSiy2p2vQr5
debug: false
service_key: c409912215b34511aa1814d8fa9b9d00
In the next few weeks, we will be adding additional functionality to the pack so that you can take advantage of even more features of PagerDuty.