I am trying to get the check_mailq command working on my Nagios install and not having much luck. I have spent the last two hours googling and not been able to resolve so hoping some kind sole can help.
I am using sendmail and want to check the mail queue on the Nagios localhost (I have issues where my SMTP relay goes offline and alert emails don't get sent).
Using Nagios Core 3.2.3
The command:
Code: Select all
define command{
command_name check_mailq
command_line $USER1$/check_mailq -w 3 -c 5 -v 9 -M sendmail
}
Code: Select all
define service {
use generic-service
host_name itmonitor
service_description SMTP Mail Queue
check_command check_mailq
}
Code: Select all
$ /usr/lib/nagios/plugins/check_mailq -w 3 -c 5 -v 9
OK: mailq is empty|unsent=0;3;5;0
Code: Select all
$ su -s /bin/bash nagios -c '/usr/lib/nagios/plugins/check_mailq -w 3 -c 5 -v 9'
OK: mailq is empty|unsent=0;3;5;0
Code: Select all
ERROR: is not executable by (uid 1001:gid(1001 1001 1002)) Any advice would be greatly appreciated!
Regards,
Scott