I'm trying to run a script from an app as an alert action.
The script is in $SPLUNKHOME/etc/apps/foo/bin/scripts/bar.sh
Do I have to create a link $SPLUNKHOME/bin/scripts/bar.sh to point to $SPLUNKHOME/etc/apps/foo/bin/scripts/bar.sh
or should $SPLUNKHOME/etc/apps/foo/bin/scripts/bar.sh already be in the PATH?
The path for the scripts that can be used in alert action for search should be
$APP_HOME/bin/scripts). You would not need any link.
I'll give that a try.
What has confused me, is a readme.txt in /opt/splunk/bin/scripts
$ cat /opt/splunk/bin/scripts/readme.txt
Scripts placed in this directory can be called by Alerts for execution
$APP_HOME/bin works !
The documentation for creating alert actions is incorrect:
The script or batch file that an alert triggers must be at either of the following locations:
Thanks for your help.