[Nagiosplug-devel] check_mailq qmail bug
    Peter Sundstrom 
    peter at katipo.co.nz
       
    Tue Dec 16 10:38:25 CET 2008
    
    
  
Using check_mailq version 1.4.13
On a debian etch system running qmail version 1.03-24, it gets
/usr/local/nagios/libexec# ./check_mailq -M qmail -c 2 -w 1
/usr/sbin/qmail-qstat: line 4: wc: No such file or directory
/usr/sbin/qmail-qstat: line 5: find: No such file or directory
/usr/sbin/qmail-qstat: line 5: wc: No such file or directory
/usr/sbin/qmail-qstat: line 6: wc: No such file or directory
/usr/sbin/qmail-qstat: line 7: find: No such file or directory
/usr/sbin/qmail-qstat: line 7: wc: No such file or directory
/usr/sbin/qmail-qstat: line 8: expr: No such file or directory
/usr/sbin/qmail-qstat: line 9: expr: No such file or directory
Couldn't match /usr/sbin/qmail-qstat output
The reason for this is that check_mailq unsets the PATH with
$ENV{'PATH'}='';
and  /usr/sbin/qmail-qstat is a simple shell script that relies on the 
PATH for wc, find and expr
Fix would be to set
$ENV{'PATH'}='/usr/bin';
just for the qmail block
    
    
More information about the Devel
mailing list