Hello There,
I wanted to use Perl script instead of shell script for the scripted output.
I put my shell perl script @ same place where other shell scripts are available.
but I am not able to get input from Perl script in splunk.
Kindly help!!
Following is the output of my perl script, which I want in splunk
mm174:/var/tmp/yad/splunk/etc/apps/Mediation/bin# /var/tmp/yad/read_bgwConfig.pl
SERVER INBUFFER OUTBUFFER
Telstra 0 2
ServerNN 0 0
Server2 0 2
Server3 0 0
Server1 4 6
Server4 0 0
Thanks a Lot for your help!
Well I was able to run the scripts from the directories.
However was confused if I can user perl script or not for the same.
Now I am able to use Perl Script and getting the output in the splunk
Thanks For your help
if you have the script and it's echoing you some output in the window then it will be sent to splunk
Would you please post the answer so other visitors looking for the same solution can find it? I'm trying to do the same thing myself. I've done this previously but didn't need to return anything back to splunk. Now I need to return the output of the script back to splunk.
Your script needs to reside inside a directory that Splunk allows script execution in. From the inputs.conf docs:
[script://<cmd>]
* Runs <cmd> at a configured interval (see below) and indexes the output.
* The <cmd> must reside in one of
* $SPLUNK_HOME/etc/system/bin/
* $SPLUNK_HOME/etc/apps/$YOUR_APP/bin/
* $SPLUNK_HOME/bin/scripts/
I also tried to call it like this
sb6270x1813:/var/tmp/yad/splunk/etc/apps/Mediation/bin# cat fe_buffer.sh
perl read_bgwConfig.pl
However did not work.