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 $splunkhome$/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^=scheduler__admin__3m__testAlert_at_1515156720_51', '', 'C:\Program Files\Splunk\var\run\splunk\dispatch\scheduleradmin3m_testAlertat151515672051\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