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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...