[users] problems in nagios-plugins package

Jim Nelson jim.nelson at neteasyinc.com
Fri Jul 20 14:55:21 CEST 2007


I've had a couple of issues dealing with a new nagios implementation using the 
rpmforge packages.

1. When using check_by_ssh, there are real problems defining commands that work 
on both 32- and 64-bit systems.  The problem lies in that the nagios plugins are 
installed in /usr/lib on a 32-bit system, and in /usr/lib64 on a 64-bit system.

My fix for it is to symlink /usr/lib64/nagios into /usr/lib, and write the 
command definitions based off of the /usr/lib/nagios path.

2. The software raid plugin, 
/usr/lib/nagios/plugins/contrib/check_linux_raid.pl, has an error in it that 
prevents it from running on RHEL 4 or 5.

After updating the nagios-plugins package on one of my older boxen, I was 
reminded of it from this alert:

> ***** Nagios 2.9 *****
> 
> Notification Type: PROBLEM
> 
> Service: RAID
> Host: xxxxxxxxxxxx
> Address: xxx.xxx.xxx.xxx
> State: UNKNOWN
> 
> Date/Time: Fri Jul 20 08:21:10 EDT 2007
> 
> Additional Info:
> 
> Remote command execution failed: Bareword utils not allowed while strict subs in use at /usr/lib/nagios/plugins/contrib/check_linux_raid.pl line 26.

If you make the symlink change above, then this patch will fix the plugin.  If 
not, then it'll have to be replaced with a check for /usr/lib64 and a 
conditional include.

--- check_linux_raid.pl.orig    2007-07-20 08:47:54.000000000 -0400
+++ check_linux_raid.pl 2007-07-20 08:45:06.000000000 -0400
@@ -23,7 +23,7 @@
  #        WARNING md0 status=[UUU_U], recovery=46.4%, finish=123.0min

  use strict;
-use lib utils.pm;
+use lib '/usr/lib/nagios/plugins';
  use utils qw(%ERRORS);

  # die with an error if we're not on Linux



More information about the users mailing list