Getting Data In

How to debug scripts execution?

JeanD
Engager

I am trying to debug a loadData.sh scripts, and I do not see output added to Splunk.

What is the best way to debug it, to understand if the script is invoked correctly from Splunk, and where the data is stored?

Thanks, Jean

Tags (2)
1 Solution

rroberts
Splunk Employee
Splunk Employee

I usually go to the Manager->System settings->System logging view change the ExecProcessor to DEBUG mode. Then I usually search ... index=_internal execprocessor to see if Splunk is running the script. Example I have a ps.sh script running in the UNIX app. Splunk is picking it up as you see below..

9:55:21.288 AM
01-07-2011 09:55:21.288 INFO ExecProcessor - Ran script: /home/rrpdfserver/opt/splunk/etc/apps/unix/bin/ps.sh, took 30.86 milliseconds to run, 17392 bytes read host=class2.splunk.com Options| sourcetype=splunkd Options| source=/home/rrpdfserver/opt/splunk/var/log/splunk/splunkd.log Options 2
1/7/11 9:55:21.255 AM
01-07-2011 09:55:21.255 DEBUG ExecProcessor - Running: /home/rrpdfserver/opt/splunk/etc/apps/unix/bin/ps.sh host=class2.splunk.com Options| sourcetype=splunkd Options| source=/home/rrpdfserver/opt/splunk/var/log/splunk/splunkd.log Options

View solution in original post

rroberts
Splunk Employee
Splunk Employee

I usually go to the Manager->System settings->System logging view change the ExecProcessor to DEBUG mode. Then I usually search ... index=_internal execprocessor to see if Splunk is running the script. Example I have a ps.sh script running in the UNIX app. Splunk is picking it up as you see below..

9:55:21.288 AM
01-07-2011 09:55:21.288 INFO ExecProcessor - Ran script: /home/rrpdfserver/opt/splunk/etc/apps/unix/bin/ps.sh, took 30.86 milliseconds to run, 17392 bytes read host=class2.splunk.com Options| sourcetype=splunkd Options| source=/home/rrpdfserver/opt/splunk/var/log/splunk/splunkd.log Options 2
1/7/11 9:55:21.255 AM
01-07-2011 09:55:21.255 DEBUG ExecProcessor - Running: /home/rrpdfserver/opt/splunk/etc/apps/unix/bin/ps.sh host=class2.splunk.com Options| sourcetype=splunkd Options| source=/home/rrpdfserver/opt/splunk/var/log/splunk/splunkd.log Options

Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...