Page 1 of 1

Installing check_jmx4perl?

Posted: Thu Jan 03, 2013 9:15 am
by disrael
My boss wants me to install check_jmx4perl on Nagios.

I have added component, though I am wondering about the install with this. Do I upload it via SSH to the server and compile it, then add a perl script in the plugin part of the admin Nagios Site?

I don't see any instructions for Nagios plugins.

-Doron

Re: Installing check_jmx4perl?

Posted: Thu Jan 03, 2013 10:31 am
by yancy
disreal,

take a look at the following doc:

http://assets.nagios.com/downloads/nagi ... ios_XI.pdf

here is the plugin I think you're referencing

http://exchange.nagios.org/directory/Pl ... rl/details

regards,

-Yancy

Re: Installing check_jmx4perl?

Posted: Thu Jan 03, 2013 10:39 am
by nscott
Doron,

While I don't have any personal experience with it, it would seem that you need to get the check_jmx4perl running on Nagios, so you would need to upload the check_jmx4perl to your Nagios's libexec directory. This will be half the battle however as you will need to install the dependency for check_jmx4perl on the Nagios server as well.

While we can't directly support it we can give a good direction on how to install it, and it would appear you can install this from CPAN, partially. I would like to begin this with I am neither a CPAN nor Perl guru, but this worked for me on a standard XI install, so give this a shot, on the Nagios XI server, as root:

Code: Select all

yum install 'perl(Term::ReadLine::Gnu)'
cpan -i JMX::jmx4perl
The CPAN part will ask you many questions about dependencies, just say yes to all the questions about dependencies. If it asks you to do a detailed setup on CPAN say no, and just use the defaults when you can.

Once you've done that you'll be able to run check_jmx4perl on the command line. From there you can either copy check_jmx4perl to the libexec or write your own shell scripts that refer to it.

Re: Installing check_jmx4perl?

Posted: Thu Jan 03, 2013 10:43 am
by disrael
Yes that is the plugin.

I guess my question, it can't be as easy as just downloading the tar.gz and uploading it via the admin? I don't see other .tar.gz, but I do see *.pl.

Do I need to actually compile the perl module or do I just unzip everything and just select the specific perl script check_jmx4perl.pl and upload that to the admin?

Thanks for the quick reply, boss is bugging me about getting this done today. :(

-Doron

Re: Installing check_jmx4perl?

Posted: Thu Jan 03, 2013 10:46 am
by disrael
nscott wrote:Doron,

While I don't have any personal experience with it, it would seem that you need to get the check_jmx4perl running on Nagios, so you would need to upload the check_jmx4perl to your Nagios's libexec directory. This will be half the battle however as you will need to install the dependency for check_jmx4perl on the Nagios server as well.

While we can't directly support it we can give a good direction on how to install it, and it would appear you can install this from CPAN, partially. I would like to begin this with I am neither a CPAN nor Perl guru, but this worked for me on a standard XI install, so give this a shot, on the Nagios XI server, as root:

Code: Select all

yum install 'perl(Term::ReadLine::Gnu)'
cpan -i JMX::jmx4perl
The CPAN part will ask you many questions about dependencies, just say yes to all the questions about dependencies. If it asks you to do a detailed setup on CPAN say no, and just use the defaults when you can.

Once you've done that you'll be able to run check_jmx4perl on the command line. From there you can either copy check_jmx4perl to the libexec or right your own shell scripts that refer to it.
Thanks for the info, this is more of what I was looking for, it looks you posted, when I was typing. Thanks for the quick reply.

Re: Installing check_jmx4perl?

Posted: Thu Jan 03, 2013 1:36 pm
by disrael
Okay I got everything installed and it looks like it is working. Not being a Java guy and never have done an install of the nagios client. Does anything really have to be done on the client side or does this use the nagios client installed on the client system?

Re: Installing check_jmx4perl?

Posted: Thu Jan 03, 2013 1:51 pm
by scottwilkerson
According to this page
http://exchange.nagios.org/directory/Pl ... rl/details

It looks like is is just talking to the jmx server via HTTP and not using any agent

Code: Select all

* No Java installation required on the Nagios host
* Fast plugin startup times because no JVM needs to be launched.
* No special JEE Server startup options required in order to access JMX information remotely
* JSON serialization allows deep access into Java objects
* Firewall friendly communication via HTTP