I am trying to connect the latest version of Splunk for JMX (Monitoring of Java Virtual Machines with JMX) to be able to query specific Weblogic health metrics of remote Weblogic instances. I have added the wljmxclient.jar in the ../etc/apps/jmx_ta/lib directory and have created a custom xml config in the ../etc/apps/jmx_ta/bin/config/ directory to point the the remote instance and jmx port. I have also attempted to add "-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote" to the command jmx.py file e.g.
java_args = [ JAVA_EXECUTABLE,"-Xbootclasspath/a:"+BOOTPATH, "-classpath",CLASSPATH,"-Xms"+MIN_HEAP,"-Xmx"+MAX_HEAP,"-Dconfighome="+CONFIG_HOME,JAVA_MAIN_CLASS,"-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote"]
With "-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote"om the command line the app (JMX.PY file) does not appear to be working. It stops seeing any JMX connections, even those that I have set up locally on the Splunk instance to use for testing purposes and had been working correctly. When I remove the addition classpath argument however the app begins to work correctly. Any ideas as to what I might be doing wrong? Perhaps adding the additional classpath attributes incorrectly?
You list ordering is wrong, place the JVM system property before the main class name variable :
java_args = [ JAVA_EXECUTABLE,"-Xbootclasspath/a:"+BOOTPATH, "-classpath",CLASSPATH,"-Xms"+MIN_HEAP,"-Xmx"+MAX_HEAP,"-Dconfighome="+CONFIG_HOME,"-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote",JAVA_MAIN_CLASS]
You list ordering is wrong, place the JVM system property before the main class name variable :
java_args = [ JAVA_EXECUTABLE,"-Xbootclasspath/a:"+BOOTPATH, "-classpath",CLASSPATH,"-Xms"+MIN_HEAP,"-Xmx"+MAX_HEAP,"-Dconfighome="+CONFIG_HOME,"-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote",JAVA_MAIN_CLASS]
Also check your jmxserver connection settings for weblogic in your config.xml file , you will most likely need to use the "jmxServiceURL" attribute to format the weblogic specific jmx server url string.
Any errors should get written to splunkd.log.
You can search this : "index=_internal ExecProcessor error jmx.py"
Thanks Damien. That appears to have fixed that issues and the app appears to be starting correctly now and we are seeing the jmx metrics from our local Jboss test instacne coming through. We are however still having issues with connectivity to Weblogic, although it could be a firewall issue which we are investigating.