All Apps and Add-ons

How do I troubleshoot a problem with jmx add-on

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)

SplunkTrust
SplunkTrust

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

Communicator

Did you ever get anywhere w/ this?

0 Karma