Friday, 1 July 2011

Nagios - Zimbra mail queue checks

Monitoring Zimbra Mail queue's with Nagios 

edit 
vi /usr/local/nagios/libexec/utils.pm

remove
$PATH_TO_MAILQ   = "/usr/bin/mailq";

Add
$PATH_TO_MAILQ  ="/opt/zimbra/postfix/sbin/mailq";

Test
/usr/local/nagios/libexec# /usr/local/nagios/libexec/check_mailq 10.0.0.251 -w 100 -c 150

Error
root@Nagi:/usr/local/nagios/libexec# /usr/local/nagios/libexec/check_mailq 10.0.0.251 -w 100 -c 150
ERROR: /opt/zimbra/postfix/sbin/mailq is not executable by (uid 0:gid(0 0))


Fix Error

edit 
vi /etc/sudoers

nagios ALL=(zimbra) NOPASSWD: /usr/local/nagios/libexec/check_clamav.pl

nagios ALL=(zimbra) NOPASSWD: /usr/local/nagios/libexec/check_mailq

No comments:

Post a Comment