Getting Data In

Correct Location for Splunk Input Scripts and troubleshooting

cmontonen
Explorer

Hello all,
I am testing Splunk's ability to use scripted output as a datasource and I am following this sequence of tutorials
http://docs.splunk.com/Documentation/Splunk/6.2.3/Data/Setupcustominputs .
I have created a top.sh dummy script (on OS X) following the example at the bottom of the document above, but unfortunately I cannot see any of the input from top.sh in Splunk.
I've made sure to chmod the appropriate exec permissions to top.sh and it also works when I run it as a standalone script.
Splunk logs tell me:

05-26-2015 12:00:13.242 +0100 ERROR FrameworkUtils - Incorrect path to script: /opt/splunk/etc/apps/scripts/bin/top.sh.  Script must be located inside $SPLUNK_HOME/bin/scripts.
05-26-2015 12:00:13.242 +0100 ERROR ExecProcessor - Ignoring: "/opt/splunk/etc/apps/scripts/bin/top.sh"

I've tried placing the script into the suggested directory, but this does not seem to make a difference.
Can anyone give me some advice on how to troubleshoot this situation?

Tags (2)

sloshburch
Splunk Employee
Splunk Employee
0 Karma

woodcock
Esteemed Legend

Put it in /opt/splunk/bin/scripts/.

0 Karma

Jarohnimo
Builder

Hi @woodcock do the scripts you place in the

opt/splunk/bin/scripts Directory remain persistent after an upgrade?

 

Can you point me to documentation that explains?

 

Thanks

 

 

 

0 Karma

Yasaswy
Contributor

Hi,
If you are planning to run scripts in "app" context the correct path would be:
$SPLUNK_HOME/etc/apps/$APPLICATION/bin/

Guessing from the error above, "scripts" is not recognized as an app. Does you install have a defined "scripts" app? If that's not the case, you will need to place your script in your bin directory:
/opt/splunk/bin/top.sh

If you have already placed the scripts here and it's still not working, can you provide the error you are seeing?

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...