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 Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

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 ...