Mailq using qmail: ERROR: is not executable by


#1

I have qmail running on a separate server from nagios. I have mailq set up to check the status of qmail. This is the entry in checkcommands.cfg:

check_mailq

define command{
command_name check_mailq
command_line $USER1$/check_mailq -w 2000 -c 2500 -M qmail
}

Nagios gives me this error on the interface:

ERROR: is not executable by (uid 502:gid(502 502))

Do i need to create a user on the mail server with that uid and give it permissions to execute qmailctl? Or is it something else? Thanks for the help.

Ian


#2

possibly creating a nagios usr (with no login shell) and assigning the files to this user with execution rights solves the problem.

Luca


#3

Nagios should be running as user/group nagios/nagios.
The fiiles in the libexec directory should have permissions of 755 and nagios.nagios.
What are your libexec files setup as, and your check_mailq especially.


#4

having the same issue

-r-xr-xr-x 1 nagios nagios 20730 May 18 13:32 check_mailq

thats permissions on file:

here is the error output of comand line

yoda# ./check_mailq -w 8 -c 15 -M qmail
ERROR: is not executable by (uid 0:gid(0 5 0 0))


#5

That plugin checks on the local host and not on “your seperate server”.
try “-M sendmail” on your local host, instead of “-M qmail” and you will see that it most likely works.


#6

well the Qmail is on this box, sendmail returns a good responce however the queue is empty (as it should be since I’m not running sendmail) I have disabled sendmail and am running qmail


#7

This plugin uses the system mailq command (sendmail) or qmail-stat (qmail)
to look at the queues. Mailq can usually only be accessed by root or
a TrustedUser. You will have to set appropriate permissions for the plugin to work.


#8

I run the command at root and still get the error.


#9

okay step1 of the fix is in utils.pm you need to specify the path to qmail.

step 2 still working on as it outputs garbage


#10

Good find, thanks for sharing that.