All Apps and Add-ons

Need to wrap a Python script in Windows Batch File

cchange
Path Finder

I have python script that I need to pass in Windows batch file. I'm not sure how to pass it. I'm trying below but it is not working.

set ZENOSS_SERVER_STANZA=zenoss
C:\Program Files\Splunk\bin\splunk cmd python C:\Program Files\Splunk\bin\splunk\etc\apps\TA-zenoss\bin\zenoss_create_event.py -s %ZENOSS_SERVER_STANZA% -f %SPLUNK_ARG_8_%

I need to pass this batch file for alerts. Any help is appreciated.

gjanders
SplunkTrust
SplunkTrust

Wouldn't that last argument be %SPLUNK_ARG_8% ?
Otherwise it looks fine, although as per Configure a script for an alert action :

The run a script alert action is
officially deprecated. It has been
replaced with custom alert actions as
a more scalable and robust framework
for integrating custom actions. See
About custom alert actions for
information on building customized
alert actions that can include
scripts.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...