check_mailq issue on localhost
Posted: Thu Jul 19, 2012 9:25 am
Hi,
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:
The service:
From command line as root:
Checking with Nagios user (I think this is right):
Nagios CGI shows:
From the CGI it suggests the Nagios user doesn't have permissions, but I don't understand why it works from the command line with the Nagios user.
Any advice would be greatly appreciated!
Regards,
Scott
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