Splunk ITSI -> PagerDuty integration
This is based on the original source code from Martin Stone at https://github.com/martindstone/pagerduty-itsi.
This is a Notable Event Action that triggers a PagerDuty incident. The following are updates from Martin Stone's original project:
- PagerDuty now has a standard Splunk integration. The same integration can be used for Core Splunk and ITSI, but field mappings require a bit of changing from ITSI.
- PagerDuty now includes incidents and alerts. By default, incidents are grouped and an incident number is not generated. If alerts are disabled for a service, an incident number is still not a unique value so retrieving an incident number from PagerDuty has been commented out in the code.
- Changed notable event action verbiage from "Trigger PagerDuty Incident" to "PagerDuty Incident Integration" to align with Splunk's Remedy Add-On verbiage
- Updated logging to follow ITSI standard logging
- HTTP call is routed through proxy in our environment, if not needed remove the proxy routing from the python script
-
Create a Splunk Integration in PagerDuty as the default
-
Copy pagerduty_itsi.py to SPLUNK_HOME/etc/apps/SA-ITOA/bin (These can also be added to shcluster/apps/SA-ITOA from Search Head Cluster deployer)
-
Modify line 55 to match your proxy server, or remove the proxy lines if your server can access public Internet directly
-
Modify def_severity to match your PagerDuty severities.
-
Copy pagerduty_itsi.html to SPLUNK_HOME/etc/apps/SA-ITOA/default/data/ui/alerts
-
Edit SPLUNK_HOME/etc/apps/SA-ITOA/local/alert_actions.conf and add the following text at the bottom:
[pagerduty_itsi] is_custom = 1 param.integration_url = <your integration URL from Step 1> param.token = <your API token from Step 2> label = Trigger PagerDuty Incident description = Trigger an incident in PagerDuty payload_format = json -
Edit SPLUNK_HOME/etc/apps/SA-ITOA/local/notable_event_actions.conf and add the following text at the bottom:
[pagerduty_itsi] disabled = 0 execute_once_per_group = 0 -
Restart Splunk: SPLUNK_HOME/bin/splunk restart
You should now see a new item called "PagerDuty Incident Integration" in the Actions menu in Notable Events.