Getting Data In

How to troubleshoot why a data input script inside an app is not running?

joao_amorim
Communicator

Hi

I have a script that I want to put inside the appName/bin dir inside a specific app.

Previously, the script was inside the splunkHome/bin and it works perfectly and in that app, I configured the inputs.conf and the default.meta accordingly to the script.

The problem is that when I moved the script from the splunkHome/bin dir to the appName/bin dir, I changed the inputs.conf and the default.meta again, but the script that previously gave me some results, now results don't appear.

I already saw this link:
http://docs.splunk.com/Documentation/Splunk/6.0.6/AdvancedDev/ScriptSetup

But it didn't help.

Anyone please.... Thanks

0 Karma

MuS
Legend

Hi joao_amorim,

first, try to run the script manually in the new location:

 $SPLKUNK_HOME/bin/splunk cmd python $SPLUNK_HOME/etc/apps/YourAppName/bin/YourScript.py

assuming it's a python script.

If this shows no error but still does not work, add some logging functions to your script - see the docs for more details about this http://docs.splunk.com/Documentation/Splunk/6.4.0/AdvancedDev/ModInputsLog
Don't be confused that this link talks about modular inputs; the method of logging is the same for scripted or modular input.

Hope this helps ...

cheers, MuS

0 Karma

joao_amorim
Communicator

Ok i will try that.

Actually my script is a .ksh so i will try and then i will let you know.

Thanks

0 Karma

joao_amorim
Communicator

@MuS do you know how to run a .ksh script in splunk?? Because I don't figure it out and already tried a lot of possibilities but no luck at all.

Best regards

0 Karma
Get Updates on the Splunk Community!

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...

Get ready to show some Splunk Certification swagger at .conf24!

Dive into the deep end of data by earning a Splunk Certification at .conf24. We're enticing you again this ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Now On-Demand Join us to learn more about how you can leverage Service Level Objectives (SLOs) and the new ...