We are attempting to use the PagerDuty Alerts for Splunk app with our Splunk instance. We currently have our Splunk instance on a Linux server that uses a web proxy. We are able to curl to the events url from the pagerduty.py script successfully when including the proxy in the curl command, but not without.
Can the python script be modified to include a section that allows for the entry of a proxy when one is being used? If so, will you be providing an updated release to accommodate this?
Ryan from the PagerDuty support team here. You may want to try our new integration that uses the native Splunk webhooks as it may work with a proxy (https://www.pagerduty.com/docs/guides/splunk-beta-integration-guide/).
We're also in the process of creating a new integration with Splunk. If you'd be interested in testing it when it's released you can apply here: https://beta.pagerduty.com.
Lastly, since the script that you reference uses the urllib2 library, it could be modified to use a proxy. The code required for such a change would be similar to another integration of ours: https://gist.github.com/ryanhoskin/202a1497c97b0072a83a#file-pd-zabbix-proxy-py-L89-L97.
Please give one of these options a shot and if you have any issues you can reach us at firstname.lastname@example.org.
You can have an update for this.
Visit this pages from pagerDuty
For me it doesn't work but I hope it works one day
12-14-2022 12:11:02.826 +0100 ERROR SearchScheduler [1700962 AlertNotifierWorker-0] - Error in 'sendalert' command: Alert script execution failed., search='sendalert pagerduty results_file="/opt/splunk/var/run/splunk/dispatch/scheduler__user__app__RMD59d9b970eac08bfa3_at_1671015960_53271/results.csv.gz" results_link="https://myserver/app/app/@go?sid=scheduler__user__app__RMD59d9b970eac08bfa3_at_1671015960_53271"'
12-14-2022 12:11:02.826 +0100 ERROR sendmodalert [1700962 AlertNotifierWorker-0] - Error in 'sendalert' command: Alert script execution failed.
12-14-2022 12:11:02.826 +0100 ERROR sendmodalert [1700962 AlertNotifierWorker-0] - action=pagerduty - Execution of alert action script failed
12-14-2022 12:11:02.824 +0100 WARN ScriptRunner [1700962 AlertNotifierWorker-0] - Killing script, probably timed out, grace=5sec, script="/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/pagerduty_incidents/bin/pagerduty.py --execute"
12-14-2022 12:06:02.567 +0100 INFO sendmodalert [1700962 AlertNotifierWorker-0] - Invoking modular alert action=pagerduty for search="TEST PagerDuty" sid="scheduler__user__app__RMD59d9b970eac08bfa3_at_1671015960_53271" in app="app" owner="user" type="saved"
To see this log on splunk :
index=_internal [search index=_internal component=sendmodalert search="TEST PagerDuty" | table thread_id | format]