I observed is that $SPLUNK_HOME
is not set on the splunk-launch.conf
file on the search heads . Is that a problem ??
Looking at a production search head of ours at /opt/splunk/etc/splunk-launch.conf
and it starts with -
# Version 6.2.2
# Modify the following line to suit the location of your Splunk install.
# If unset, Splunk will use the parent of the directory this configuration
# file was found in
#
# SPLUNK_HOME=/home/build/build-home/6.2.2
Which means that $SPLUNK_HOME
would be set by the software to /opt/splunk
. So, apparently we don't need to do a thing ; -)
It's interesting that when running $ set
at the command line, no SPLUNK
variables show up.
Yes, I can't see the output of echo $SPLUNK_HOME
as well.
As @MuS said at Where is splunk installed on Linux?
/opt/splunk/bin/splunk envvars
Shows it. I see -
... SPLUNK_HOME=/opt/splunk ; export SPLUNK_HOME ...
Ya, can be seen in through the command
/opt/splunk/bin/splunk envvars
If $SPLUNK_HOME is not set, the default value will be used. Are you experiencing a problem?
no errors for now. Just curious as I don't see the output of echo $SPLUNK_HOME
as well.
If you want to be able to see it then you could always just type the following on the cmd line:
export SPLUNK_HOME=/opt/splunk
One nice feature is shell completion. You could start it by
More on https://community.splunk.com/t5/Deployment-Architecture/CLI-command-completion-Yes-and-here-s-how-Fo... and somewhere in docs, but I can’t found it now.
Sourcing above to shell also se $SPLUNK_HOME
r. Ismo
You don't see it because it's not set in your environment. It's in Splunk's environment, however.