PDA

View Full Version : JMX suggestion


bcrowder
24-09-2011, 01:15
Multiple-instance JVM monitoring on a single host could be improved.

Right now I have a template, and i use "virtual" hosts to monitor them. For each JVM i have a separate host defined, linked to the template, with appropriate macros defined at the host level (IP, PORT, USERNAME, PASSWORD).

I can't set up a low-level discovery because each instance of JVM requires a separate "interface" defined on the host, and the key has no distinction for an instance, as most (all?) keys for multiple-instance items do (vfs.fs, net.if).

Putting the port in as the first parameter to the key would solve the key-uniqness problem, and not require multiple "interfaces" to communicate to the separate JVMs. It would also be in line with the current usage of keys for multiple-instance items having the instance as a parameter in the key.

Ideally for me, i'd have a low-level discovery item like jmx.apps.discovery that would return a list of instances and the corresponding port (and maybe username and password) to use. I can then define a template of JMX items with name "{HOSTNAME}{#JMXAPP} - Perm Gen used" and key jmx[{#JMXPORT},"java.lang:type=MemoryPool,name=PS Perm Gen","CollectionUsage.used"]
{#JMXUSER} for username, {#JMXPASS} for password. If another instance is needed, adding it to the discovery script is 10 seconds of work.

vlturner
23-12-2011, 21:52
I am working on this. You can get the jvm data with the jstat by supplying the port or the pid.

I can discover the pid's using pgrep to get them, or the equiv. perl routine.

But I need ways to differentiate the keys.

I have a number of jvms that listen on ports so the command line has the port number exposed. So now I need to create a template that instantiates keys base on the jvm instances port.

How can this be done.

olgierd
11-01-2012, 12:48
I am working on this. You can get the jvm data with the jstat by supplying the port or the pid.

I can discover the pid's using pgrep to get them, or the equiv. perl routine.

But I need ways to differentiate the keys.

I have a number of jvms that listen on ports so the command line has the port number exposed. So now I need to create a template that instantiates keys base on the jvm instances port.

How can this be done.

I am also interested in this. This will be a huge help in my Zabbix setup for multiple tomcat/java instances on one host machine.