[users] problems in nagios-plugins package
Jim Nelson
jim.nelson at neteasyinc.com
Fri Jul 20 15:09:34 CEST 2007
Jim Nelson wrote:
> 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
Hm - looking at some of the plugins I don't use, there might need to be a bit
more fixing:
> # grep utils.pm /usr/lib/nagios/plugins/contrib/*
> /usr/lib/nagios/plugins/contrib/check_apc_ups.pl:use lib utils.pm;
> /usr/lib/nagios/plugins/contrib/check_appletalk.pl:use lib utils.pm;
> /usr/lib/nagios/plugins/contrib/check_javaproc.pl:use lib "utils.pm" ;
> /usr/lib/nagios/plugins/contrib/check_rrd_data.pl: # require "$runtimedir/utils.pm";
> /usr/lib/nagios/plugins/contrib/check_rrd_data.pl:require '/usr/lib/nagios/plugins/utils.pm';
> /usr/lib/nagios/plugins/contrib/check_rrd_data.pl:# use strict; # RRD:File and utils.pm don't like this
> /usr/lib/nagios/plugins/contrib/check_snmp_printer.pl:use lib "utils.pm";
> /usr/lib/nagios/plugins/contrib/check_snmp_procs.pl:use lib utils.pm;
Would you prefer a patch against all of these, or is there an upstream
maintainer I need to work with?
P. S. - whoever has their autoreply turned on, PLEASE turn it off for mailing
lists...
More information about the users
mailing list