Deployment Architecture

Missing /sbin in PATH and troubleshoting *nix scripts not functioning

jhallman
Explorer

/sbin was not in the path so things like ifconfig used in *nix apps

$SPLUNK_HOME/etc/apps/unix/bin/interfaces.sh is not reporting throughpout data.

I tried Manager » Server controls Restart Splunk.

Will I have to restart the process itself to get it to recognize /sbin is now in the PATH?

Also, how can I more easily figure out when some *nix script is not working properly?

Thanks

Tags (1)
0 Karma

jhallman
Explorer

So each script calls common.sh

In common.sh we added

if [ $# -ge 1 -a "x$1" = "x--debug" ] ; then
        DEBUG=1
        TEE_DEST=`dirname $0`/debug--`basename $0`--`date | sed 's/ /_/g;s/:/-/g'`
else
        DEBUG=0
        TEE_DEST=/dev/null
fi
####Add this
    DEBUG=1
    TEE_DEST=`dirname $0`/debug--`basename $0`--`date | sed 's/ /_/g;s/:/-/g'`
####End Add

which created a debug file (for each script being run) and within
debug--interfaces.sh--* we saw ifconfig command not found.

We ultimately stopped/restarted the splunk service and the new PATH got picked up.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...