Installation

splunk-launch.conf not working

goelt2000
Explorer

Hi,

Can I request, if someone can help me with below:
I have installed splunk free download initial 30 days on Centos 6.5 server edition.
When I start spunk with root user from init.d somehow the variables from splunk-launch.conf are not getting set.
I had to manually put spunk_home in bashrc and it is not an issue. For indexes.conf file I copied default copy from default to local. and it uses spunk_db and other environmental variables. I can set them all as well in bashrc, but that would make it more error prone because I will have to review each and every file where it is used.
I was wondering why the launch config is not being used when I try starting spunk.

Thanks !!

Tags (1)
0 Karma

Jason
Motivator

You won't see values like $SPLUNK_HOME in the whole OS. They are only available within Splunk. You can run a program as splunk would by typing ./splunk cmd ... in Splunk's bin folder.

$ whereis python
/usr/bin/python ...
$ /usr/bin/python
>>> import os
>>> os.environ['SPLUNK_HOME']
KeyError: 'SPLUNK_HOME'
>>>
$ /opt/splunk/bin/splunk cmd /usr/bin/python
>>> import os
>>> os.environ['SPLUNK_HOME']
'/opt/splunk'
>>>
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 ...