Alerting

Error Code 1 when running .bat script in response to an alert

jospina2
Explorer

I set up an alert so that when it triggers it runs a script called test.bat (this is a windows environment) which is located in $SPLUNK_HOME/bin/scripts. The .bat script is just a one liner that says "echo hello"

splunkd.log shows this error when it tries to execute it:
08-14-2018 17:09:07.268 -0700 ERROR script - sid:scheduler_jeff_search_RMD581e2e8e1bcfdf00c_at_1534291740_150 command="runshellscript", Script: C:\Program Files\Splunk\bin\scripts\test.bat exited with status code: 1

This is how I have my alert setup (see picture) - any help is appreciated.

alt text

Tags (1)
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Casting Call: Compete in Cyber Games

Lights, Camera, SecOps: Apply to Compete in Cyber Games     Think you have what it takes to beat the clock? ...

Data Management Digest – June 2026

Welcome to the June 2026 edition of Data Management Digest! This month’s update is short and sweet, with a ...

Think Like an Architect: Introducing the Splunk Certified Cybersecurity Defense ...

In cybersecurity, defenders respond to threats. Architects design the systems that stop them.    As ...