check_mailq is not executable

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
bv406
Posts: 31
Joined: Tue Apr 11, 2023 11:45 am

check_mailq is not executable

Post by bv406 »

check_mailq is not executable by (uid 1000:gid(1000 1000 100

OS Agent: Oracle Linux Server release 8.5
CLI test on mailserver

Code: Select all

# sudo -u nagios /usr/local/nagios/libexec/check_mailq -w 2000 -c 3000
ERROR:  is not executable by (uid 1000:gid(1000 1000 1001)) and sudo is not set in utils.pm

# ls -l /usr/local/nagios/libexec/check_mailq
-rwxr-xr-x 1 root nagios 25575 Aug  5  2021 /usr/local/nagios/libexec/check_mailq

# ls -lrt /usr/bin/mailq*
lrwxrwxrwx 1 root root 31 Oct 10  2021 /usr/bin/mailq.postfix -> ../../usr/sbin/sendmail.postfix
lrwxrwxrwx 1 root root 27 Jan 29  2022 /usr/bin/mailq -> /etc/alternatives/mta-mailq

# /usr/local/nagios/libexec/check_mailq -w 2000 -c 3000
ERROR:  is not executable by (uid 0:gid(0 0)) and sudo is not set in utils.pm
I also had put "nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_mailq" in /etc/sudoers

Where I should check next?

UPDATE: I use this plugin instead https://exchange.nagios.org/directory/P ... ue/details and now able to check mailq from nagios
kg2857
Posts: 234
Joined: Wed Apr 12, 2023 5:48 pm

Re: check_mailq is not executable

Post by kg2857 »

I'm having the same issue on RHEL 8.x...
That plugin is a perl script and it works ok as root, but not nagios. My guess is that the script is running something like mailq and that needs sudo defined as well.
shoreypu
Posts: 86
Joined: Wed Mar 13, 2019 2:06 pm

Re: check_mailq is not executable

Post by shoreypu »

For "UPDATE: I use this plugin instead https://exchange.nagios.org/directory/P ... ue/details and now able to check mailq from nagios", the link does not work. Can you, or someone, provide the URL or name of the plugin being referenced?

Thanks in Advance.
gwesterman
Posts: 82
Joined: Wed Aug 23, 2023 11:29 am

Re: check_mailq is not executable

Post by gwesterman »

Hi @shoreypu,

Based on what is left of the url, my guess is that it linked here. There are some other mailq plugins on the exchange so if that one doesn't work or fit what you need, there may be another that's more applicable.

Hope this helps!

Thank you!
Post Reply