Alerting

Alert Script not running Splunk

shilpi
New Member

I created an search query and I am trying to send an alert mail and run a script through splunk.
Though I get the alert mail, script does not seem to be executing.
I tried executing the default script "echo.sh" but its also not working.
If I execute "echo.sh", it works.
I have placed my script in $SPLUNKHOME/bin/scripts ( where echo.sh is present )
Please help

0 Karma

adrianathome
Communicator

Did you configure an email server?http://docs.splunk.com/Documentation/Splunk/5.0.3/Alert/Setupalertactions#Configure_email_alert_sett...

I see that you ate getting the email, but script not running. Did you check permissions on script? Is it executable?

Also take a look at the python.log for more clues.

Have you looked at this?http://wiki.splunk.com/Community:TroubleshootingAlertScripts

0 Karma

adrianathome
Communicator

Log location should be $SPLUNK_HOME/var/log/splunk/

There should be a python.log file there.

The other thing is to make sure that you are using the python version that splunk will use. You can test this with the following command:
$SPLUNK_HOME/bin/splunk cmd python script.py

0 Karma

shilpi
New Member

Thanks for your reply.
Yes The script is executable and it run when executed manually.
I do not see any python.log in var/log.
Only logs present are splunkd.log and metrics.log.
I have already referred to the link provided by you but nothing seems to be working.
Please let me know in case you have any idea

0 Karma

Chinmai
Explorer

Hello Shilpi,

Did you find the solution for this? Even I am facing the same problem.

Thanks in advance.

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!

Mastering Threat Intelligence in ES 8.5, Splunk AI Assistant v2, and More from Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Break the Build: Inside the KubeDoom Lounge at .conf26

    You step up to the machine. The pixelated corridors of a certain 1993 FPS load in front of you, EMP Pulse ...

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...