[Nagiosplug-devel] Re: check_qmailq

Paul L. Allen pla at softflare.com
Thu Jan 8 08:13:00 CET 2004

Voon, Ton writes: 

> I've just had a quick look at check_qmailq.pl and it looks like the
> functionality has been rolled into check_mailq.pl (CVS HEAD).

I just grabbed 1.4.0alpha and yes, it LOOKS that way.  Three problems. 

1) Starts with #!/usr/local/bin/perl 

2) Whatever I do, I get spurious error messages 

   Duplicate specification "Warning=i" for option "warning"
   Duplicate specification "Critical=i" for option "critical" 

3) qmail-qstat is a shell script which makes use of wc, find, and expr.
So unless $ENV{PATH} is set to /usr/bin all you get is a stream of
complaints about no such file or directory. 

> As I don't know anything about qmail, could you look over check_mailq and
> see if your patches still apply to this?

The two patches were just things that reduced the amount of duplicated
logic because I dislike code where I write the same thing more than once -
it means I have to remember to change it in several places if a change is
needed.  And since check_mailq is doing its own limit checking, it doesn't
need my range-checking routine either.  However, there has been mention
of standard libraries to do range-checking for a while, and nothing has
appeared.  What I have is at least a start (you still have to split
lists of ranges yourself and convert things like 10M to purely numeric
(percentages are OK because perl ignores the % sign and treats them as
numbers anyway). 

Paul Allen
Softflare Support 

More information about the Devel mailing list