Getting Data In

Splunk .bat script file not getting triggered

New Member

I'm having a simple alert (for POC, so checking with _internal data) and on alert action there is 'add to triggered alerts' and 'run a script'. I'm able to see the triggered alerts, but the .bat file doesn't seem to run. I'm able to run it manually, but not through the alert action.

I've placed my try.bat under $splunk_home$/bin/scripts folder. While checking for "try.bat" in index=_internal, i get the below event:

2018-01-05 18:22:19,585 +0530 INFO runshellscript:141 - ['C:\Program Files\Splunk\bin\scripts\try.bat', '44', 'index^=internal^ 3mreportErrors', 'index^=_internal^ 3mreportErrors', 'testAlert', 'Saved^ Search^ ^[testAlert^]^ number^ of^ events^(44^)', 'http://CDC2-L-5286WND:8001/app/3m/@go?sid^=scheduleradmin3mtestAlert_at_1515156720_51', '', 'C:\Program Files\Splunk\var\run\splunk\dispatch\scheduleradmin3m_testAlert_at_1515156720_51\results.csv.gz']

@echo off
REM Next command inputs the greeting
echo Hello! This a sample batch file.
time /t >> "c:\sandya\output.txt"

I'm using Windows 10, Splunk 7

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud | Unified Identity - Now Available for Existing Splunk ...

Raise your hand if you’ve already forgotten your username or password when logging into an account. (We can’t ...

Index This | How many sides does a circle have?

February 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...