[Nagiosplug-devel] Re: OF nagios plugins

Paul L. Allen pla at softflare.com
Wed Jun 8 18:24:03 CEST 2005


Gavin Carr writes: 

>  - check_linux_raid, a generalised version of contrib/check_linux_raid.pl

I had to hack that myself to deal with various things that /proc/mdstat
did in more recent versions of Red Hat.  It's late now (and I have applied
several glasses of de-stressing fluid) so when I get time I'll check what
you've done and see if I've done anything you've missed and try to merge
it in.  If that's too hard I'll send you mine and let you try to merge it
in. :) 

>  - check_qmailq - based on contrib/check_qmailq.pl

At one point check_mailq added support for checking qmail queues.  If it
worked properly it would be better to use that rather than having a
separate plugin to check qmail queues.  Check_mailq added -W and -C
options for checks on preprocessed messages as reported by qmail-qstat.
Unfortunately, the way it used GetOpt::Long caused meant that -W and -C
caused an error about about a conflict with -w and -W and a conflict with
 -c and -C with some versions of Getopt::Long.  Even more unfortunately, I
believe a patch was submitted to "fix" the problem by removing the -W and
 -C options.  A better fix is to change -W and -C to (say) -p and -q.  An
even better fix is to add the line "use Getopt::Long::Configure('bundling')
(which is how check_ntp manages to work with upper- and lower-case options
with versions of Getopt::Long that check_qmailq barfs on). 

Another point with check_mailq is that the authors clearly tested it on a
qmail installation that has Bruce Guenther's unofficial and unsanctioned
qmail patches.  In particular, the installation had the patch that allows
unprivileged users to run qmail-qstat (technically, it replaces the
qmail-qstat shell script with a script that connects to a privileged
daemon).  Installations that do not have the qmail-qstat patch will fail to
work with check_mailq unless you setuid root on qmail-qstat or do some sudo
magic.  This is undocumented in the plugin, so if you don't have the patch
(or haven't applied it because you don't want ordinary users to see the
output of qmail-qstat) then check_mailq will fail and you won't know why it
fails for you even though it apparently worked for the authors. 

If those problems are fixed then check_mailq is a better way of doing it.
If only because it means somebody else is maintaining it and you don't have
to. :) 

-- 
Paul Allen
Softflare Support 





More information about the Devel mailing list