Page 1 of 1

Solution to collect JMX metrics from different JVM types

Posted: Wed May 19, 2021 6:22 pm
by meganwilliford
Hello,

We are looking to see if anyone has any expertise or best practices around a potential universal solution to collect JMX metrics from three different types of JVMs.

Tomee including a tomcat manager webapp with jmxproxy, Tomee without manager webapp, and CloudView.

Ideally the solution would utilize NCPA on the remote JVM servers. I've looked into using the check_jvm.jar plugin but does this work for all JVM types and can it reach a proxy rather than establishing single JVM connections?

Any ideas?

Re: Solution to collect JMX metrics from different JVM types

Posted: Thu May 20, 2021 10:42 am
by ssax
If you have JMX setup on it you can use this:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Although I've never tested it against Tomee/Cloudview as we don't have any experience with them.

Re: Solution to collect JMX metrics from different JVM types

Posted: Fri May 21, 2021 1:04 pm
by meganwilliford
I think the piece we're trying to avoid is using this connection: "service:jmx:rmi:///jndi/rmi://localhost:<port>/jmxrmi". Instead, we're trying to reach a form of JMX proxy. However the JMX proxy would have a username/password we'd have to enter and can only be reached from the remote host.

So I'm thinking something like if there is an NCPA plugin on the remote host that can authenticate with the username/password then read and parse the JMX proxy? But unsure what the plugin would be. Does that make sense?

Re: Solution to collect JMX metrics from different JVM types

Posted: Mon May 24, 2021 10:21 am
by ssax
What is the JMX Proxy software that you are using?

check_jmx does have the ability to pass user/password, I'm wondering if you can just point it at the JMX proxy URL:

Code: Select all

 -username <user name> -password <password>
            Credentials for JMX
I also found this that may work:

https://metacpan.org/pod/distribution/j ... Proxy-mode

Which you can install and test like this:

Code: Select all

cpan -i Term::ProgressBar Term::ReadLine::Perl
cpanm JMX::Jmx4Perl
check_jmx4perl -h