Compiling

To compile the plugins, you run:

gunzip -c nagios-plugins-1.4.10.tar.gz | tar -xf -
cd nagios-plugins-1.4.10
./configure
make

./configure appears to hang

If you find that the configure script appears to hang on this line:


checking for redhat spopen problem...

Then you probably have a badly configured DNS server. This part of configure is testing for a pthread problem in Bind that is a kernel problem on some Red Hat derived versions of Linux (around kernel 2.6.9-11). It runs 10 x 100 nslookup calls to see if your kernel has this problem. If it does, then at least 1 of those calls will fail. Failure rate could be anywhere between 1% and 50%.

To force the workaround and ignore the test, run ./configure with the --enable-redhat-pthread-workaround switch.

You can run ./configure with --disable-redhat-pthread to ignore this test.

check_ldap, check_radius or check_pgsql don't compile even though configure output says the required libraries are present

Due to a bug in the 1.4.7 and 1.4.8 releases, check_ldap, check_radius and check_pgsql won''t compile if MySQL libs are present even if configure output says the required libraries are present. This is fixed in 1.4.9

Here's the easiest way to compile and install these plugins:

  • cd to the plugins/ directory of the Nagios-plugins source tree
  • For each missing plugin, run "make check_", eg //$ make check_ldap//
  • Copy all pugins built above to your Nagios plugins directory (usually /usr/local/nagios/libexec/).

How come check_http/check_tcp doesn't work with --ssl?

To get the SSL features, you need to have the SSL libraries available. Either OpenSSL or GNUTLS is suitable.

Check the ./configure output to see if the SSL libraries have been detected.

How do I compile the Nagios::Plugin perl module?

This is currently an optional setting at configure time. You need to run:


./configure --enable-perl-modules

Then, make, make install, make test, and make clean, will include the perl modules that are in the perlmods/ directory as expected.

The perl modules are installed into $prefix/perl.

I get '":types" is not exported by the Params::Validate module' when running tests

This is a known problem with the Nagios::Plugin perl module: http://rt.cpan.org//Ticket/Display.html?id=29339.

However, it is now fixed in Nagios::Plugin 0.21, which is distributed with Nagios Plugins 1.4.10.