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
... View more