All Apps and Add-ons

How do I troubleshoot a problem with jmx add-on

stevedarnowsky
Engager

I am trying to use the jmx add-on with Splunk Lite.
I followed the instructions in the jmx add-on document for the configuration from the command line. Copied the inputs file from default to local folder as directed and created a config.xml file in bin/config folder as follows:
<jmxpoller>
<jmxserver pidFile="/opt/amps/sm70/instances/ndsoa01/java.pid" jvmDescription="nd01M">
<mbean domain="java.lang" properties="type=Memory">
<attribute name="NonHeapMemoryUsage:used" outputname="nonHeapUsed"/>
<attribute name="NonHeapMemoryUsage:max" outputname="nonHeapMax"/>
<attribute name="HeapMemoryUsage:used" outputname="HeapUsed"/>
<attribute name="HeapMemoryUsage:max outputname="HeapMax"/>
</mbean>
</jmxserver>
</jmxpoller>

When I restart Splunk from the web I get a mail with this message:
Unable to initialize modular input "jmx" defined inside the app "Splunk_TA_jmx": Introspecting scheme=jmx: script running failed (exited with code 1).

I tried a suggestion for troubleshooting this error message and got this result:
$SPLUNK_HOME/bin/splunk cmd $SPLUNK_HOME/bin/splunk cmd $SPLUNK_HOME/bin/python /opt/amps/splunk/etc/apps/Splunk_TA_jmx/bin/jmx.py
Conf is currently being modified by process 19088.
Conf is currently being modified by process 19088.
Conf is currently being modified by process 19088.
Conf is currently being modified by process 19088.
Conf is currently being modified by process 19088.
Conf is currently being modified by process 19088.
Traceback (most recent call last):
File "/opt/amps/splunk/etc/apps/Splunk_TA_jmx/bin/jmx.py", line 122, in <module>
Conf is currently being modified by process 19088.
token = ET.fromstring(xml_str).find('session_key').text
File "/opt/amps/splunk/lib/python2.7/xml/etree/ElementTree.py", line 1301, in XML
return parser.close()
File "/opt/amps/splunk/lib/python2.7/xml/etree/ElementTree.py", line 1654, in close
self._raiseerror(v)
File "/opt/amps/splunk/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: no element found: line 1, column 0

Tags (1)

harsmarvania57
Ultra Champion

Hi

Please try below troubleshooting steps:

  1. Have you installed Java Runtime Environment 1.7+ ?
  2. Can you please try to run $SPLUNK_HOME/bin/splunk cmd $SPLUNK_HOME/bin/python $SPLUNK_HOME/etc/apps/SPLUNK4JMX/bin/jmx.py --scheme . When you run this command it shows output as below, if it runs without error otherwise it will throw an error

    <scheme>
        <title>JMX (Java Management Extensions)</title>
        <description>Monitor Java Virtual Machines via their exposed JMX MBean attributes, operations and notifications</description>
    .............
    .............
                </arg>
            </args>
        </endpoint>
    </scheme>
    

Thanks,
Harshil

0 Karma

banderson7
Communicator

Did you ever get anywhere w/ this?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...