All Apps and Add-ons

Connecting to multiple jmx instances using Splunk for JMX

sjanwity
Communicator

We've installed Splunk 6 on our server which contains about 6 different JMX instances. We want to hook all of them up into our Splunk JMX plugin.

Is it as easy as editing the config.xml file and adding a new jmx server host? Currently this is:

<jmxserver host="[[system name]]" jvmDescription="common_raw" jmxport="53632">

Which works fine but we want to onboard other JMX instances as well. Is there a simpler method I've missed? Sorry for not trying it out beforehand - this is a production box so I don't want to muck things up for everybody!

0 Karma

Damien_Dallimor
Ultra Champion

You have a dangling jmxserver closing tag.

</jmxserver>
0 Karma

sramiz
Path Finder

alt text

0 Karma

sramiz
Path Finder
<formatter className="com.dtdsoftware.splunk.formatter.TokenizedMBeanNameQuotesStrippedFormatter" />

<!--  cluster example, many JVMs that have the same MBeans can be conveniently grouped together -->
<cluster name="IDM_QAC" description="A cluster of IDM APPS in QAC">

<!-- Mbeans common to all cluster members -->
<mbean domain="java.lang" properties="type=Memory">

<attribute name="HeapMemoryUsage:used" outputname="heapUsed"/>
<attribute name="HeapMemoryUsage:max" outputname="heapMax"/>

</mbean>

<!-- cluster members with many examples of connecting to JMX Servers -->
<jmxserver host="devrha11" jvmDescription="QAC_OAM1" jmxport="9001"/>
<jmxserver host="devrha12" jvmDescription="QAC_OAM2" jmxport="9001"/>
<jmxserver host="devrha15" jvmDescription="QAC_OIM1" jmxport="9001"/>
<jmxserver host="devrha16" jvmDescription="QAC_OIM2" jmxport="9001"/>
<jmxserver host="devrha50" jvmDescription="QAC_OVD1" jmxport="9001"/>
<jmxserver host="devrha51" jvmDescription="QAC_OVD1" jmxport="9001"/>
</jmxserver>
</cluster>
</jmxpoller>enter code here
0 Karma

Damien_Dallimor
Ultra Champion

Look in jmx_ta/bin/config/examples/config_cluster_example.xml for an example configuration.

0 Karma

sjanwity
Communicator

Thanks for the quick reply! It looks like for a cluster of servers though...I just want the JMX instances inside the same box but outputting through different ports?

0 Karma

Damien_Dallimor
Ultra Champion

It is for a cluster of JVMs , local or remote or a mixture of both.Trust me , I wrote it 🙂

0 Karma

sramiz
Path Finder

Hi Damien

Using your example cluster file .. still getting an error. Any suggestion?
validation failed: "cluster" must be terminated by the matching end-tag



0 Karma

Damien_Dallimor
Ultra Champion

Post the actual error.

Post the actual xml config you are using.

0 Karma

sramiz
Path Finder

Blockquote

Blockquote

alt text

0 Karma

Damien_Dallimor
Ultra Champion

I don't see anything.

0 Karma
Get Updates on the Splunk Community!

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...