All Apps and Add-ons
Highlighted

Need to wrap a Python script in Windows Batch File

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 ZENOSSSERVERSTANZA=zenoss
C:\Program Files\Splunk\bin\splunk cmd python C:\Program Files\Splunk\bin\splunk\etc\apps\TA-zenoss\bin\zenosscreateevent.py -s %ZENOSSSERVERSTANZA% -f %SPLUNKARG8_%

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

Highlighted

Re: Need to wrap a Python script in Windows Batch File

SplunkTrust
SplunkTrust

Wouldn't that last argument be %SPLUNKARG8% ?
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