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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...