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: 14
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: 70
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.
Post Reply