Deployment Architecture

Can the DB Connect Java_home variable use wildcards in the path?

mcronkrite
Splunk Employee
Splunk Employee

According to the documentation here http://docs.splunk.com/Documentation/DBX/1.1.5/DeployDBX/Installtheconnector
the JAVA_HOME path needs to be set, like this echo $JAVA_HOME to see the path, such as, "/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre"

But having recently upgraded JAVA due to standard patching, my new path was "/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71-2.5.3.1.el7_0.x86_64/jre”

Is there any way to add a wildcard path in the config for the attribute home, located at $SPLUNK_HOME/etc/apps/dbx/local/java.conf?

[java]
home = JAVA_HOME path

0 Karma

bishopolis
Path Finder

To reiterate what @martin_mueller said:

  • typically NO path statement takes wildcards
  • typically you'll need a symlink to point to the correct one
  • you're on Enterprise Linux: you'll have the links managed for you when you install the proper package,
  • your JAVA_HOME is just /usr/lib/jvm/jre and it never changes

so, simply

install -m755 <(echo export JAVA_HOME=/usr/lib/jvm/jre) /etc/profile.d/javahome.sh

.. and you're done.

Extra credit: add that into the RPM you use to pull in the JRE, but remember that we don't have a yum repo yet so don't link in db-connect as a dependency if you do.

(Check out https://answers.splunk.com/answers/33933 for the trivial repo question; it shouldn't be long, now)

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

The usual way is to have a symlink that points to whatever your current java versioned directory is, and have that symlink path in the JAVA_HOME variable. When you update java you update the symlink when finished.

Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...