Page 1 of 3

Check_Eximailqueue query returned no output!

Posted: Mon Feb 29, 2016 2:18 am
by rlinux57
Check Locally:

Code: Select all

./check_eximailqueue -w 3 -c 4
Mailqueue OK - 0 messages on queue
Check from NMS:

Code: Select all

./check_nrpe -H IP_Address -c check_eximailqueue
[color=#FF0000]Mailqueue WARNING - query returned no output![/color]
cat /etc/sudoers:

Code: Select all

Defaults:nagios !requiretty
%nagios         ALL=(ALL)       NOPASSWD: ALL
nagios          ALL=NOPASSWD:/usr/sbin/exim
nagios          ALL=(ALL) NOPASSWD:/usr/lib64/nagios/plugins/
Please find check_eximailqueue attachment:

Re: Check_Eximailqueue query returned no output!

Posted: Mon Feb 29, 2016 10:52 am
by rkennedy
What is the result if you run the script on the client machine without NRPE?

Re: Check_Eximailqueue query returned no output!

Posted: Mon Feb 29, 2016 2:01 pm
by rlinux57

Code: Select all

./check_eximailqueue -w 3 -c 4
Mailqueue OK - 0 messages on queue

Re: Check_Eximailqueue query returned no output!

Posted: Mon Feb 29, 2016 2:05 pm
by rkennedy
Ah - for whatever reason I assumed that was on the XI server. What user are you running it as in the above command, and what are the permissions on check_eximailqueue?

Re: Check_Eximailqueue query returned no output!

Posted: Mon Feb 29, 2016 2:11 pm
by rlinux57
It's nagios core.

Code: Select all

ll /usr/lib64/nagios/plugins/check_eximailqueue 
-rwxr-xr-x 1 root root 2417 Feb 29 08:01 /usr/lib64/nagios/plugins/check_eximailqueue*

Re: Check_Eximailqueue query returned no output!

Posted: Mon Feb 29, 2016 2:18 pm
by rkennedy
What happens if you change the permissions to nagios:nagios? I realize you're trying to run this through sudo rules, but I believe permissions are the issue at this point.

Also - when you ran the command above, was that as root or nagios?

Re: Check_Eximailqueue query returned no output!

Posted: Mon Feb 29, 2016 2:21 pm
by rlinux57
I have changed it to nagios.nagios but still same issue.

I have run that command as root user.

Re: Check_Eximailqueue query returned no output!

Posted: Mon Feb 29, 2016 2:25 pm
by rkennedy
Can you try running the command as nagios and post the result?

Re: Check_Eximailqueue query returned no output!

Posted: Mon Feb 29, 2016 2:38 pm
by rlinux57
How can i run command as nagios user whereas no shell given to nagios user ?

Code: Select all

nagios:x:988:984::/var/spool/nagios:/sbin/nologin

Re: Check_Eximailqueue query returned no output!

Posted: Mon Feb 29, 2016 2:44 pm
by ssax
In the script it lists exim as this:

Code: Select all

/usr/local/exim/bin/exim
First find out which location is the right one and then you can adjust them to match.

Give that a try and let us know.