[Nagiosplug-help] check_mailq: Return code of 101 is out of bounds

Chris Alexander chris.alexander at crc.ca
Mon Sep 22 11:02:05 CEST 2003


I'm having a problem with the mailq plugin.

/var/log/maillog:

Sep 22 10:27:27 maildrop sendmail[20787]: NOQUEUE: SYSERR(nagios): can not
chdir(/var/spool/mqueue/): Permission denied

The nagios log:

[1064253513] Warning: Return code of 101 for check of service 'Mail Queue' on
host 'maildrop.crc.ca' was out of bounds.

I can't seem to get around this problem with the check_mailq plugin unless I set
/var/spool/mqueue world readable.

User/group nagios has group access to the directory...which doesn't seem to matter:

/var/spool/mqueue is uid:gid root/mail

user nagios is a member of group "mail".

setting /var/spool/mqueue group readable doesn't help.

This occurs with both 1.3, 1.3.1 and 1.4 (from CVS) versions of check_mailq.

I had set the directory o+rx during testing and forgotten about it as the error
went away and I got sidetracked on other things. But it comes back after rpm
upgrades of sendmail as it resets the dir permissions (of course). I'd like to
have a more permanent fix.

The wierd thing is that the plugin doesn't complain on the command line...

[root at maildrop libexec]# /usr/local/nagios/libexec/check_mailq -w 500 -c 900
OK: mailq is empty|unsent=0;500;900;0

(cmd line cut and paste from nrpe.cfg)

Any insights appreciated.







More information about the Help mailing list