All Apps and Add-ons

PagerDuty Alerts for Splunk: Can the pagerduty.py script be modified to include a section that allows the entry of a web proxy?

ccrocco
New Member

Hello,

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?

Thanks

0 Karma

ryan51012
New Member

Hello,

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 support@pagerduty.com.

Best regards,
Ryan

0 Karma

mclane41
Explorer

You can have an update for this.

Visit this pages from pagerDuty

https://www.pagerduty.com/docs/guides/splunk-integration-guide/

 

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]
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...