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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...