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

Application management with Targeted Application Install for Victoria Experience

  Experience a new era of flexibility in managing your Splunk Cloud Platform apps! With Targeted Application ...

Index This | What goes up and never comes down?

January 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Splunkers, Pack Your Bags: Why Cisco Live EMEA is Your Next Big Destination

The Power of Two: Splunk + Cisco at "Ludicrous Scale"   You know Splunk. You know Cisco. But have you seen ...