I am attempting to use collectd to connect to a JVM process running on the same machine. The GenericJMX collectd plugin is configured via a ServiceURL which is all well and good if the JVM has remote JMX access enabled. However, is it possible to do this without remote JMX access enabled?
This detailed answer explains that (since Java 6) even JVMs not started with -Dcom.sun.management.jmxremote
still expose JMX access via "memory-mapped files found in /tmp/hsperfdata_[user]
". That's how JConsole access works. But can I get collectd to use this connection method? Is there such as thing as a "local" JMX Service URL? Or do I have to enable an RMI registry port (-Dcom.sun.management.jmxremote.port=[rmiregistryport]
) for this to work at all?