Check_Eximailqueue query returned no output!

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Check_Eximailqueue query returned no output!

Post 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:
Attachments
check_eximailqueue.txt
(3.22 KiB) Downloaded 386 times
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check_Eximailqueue query returned no output!

Post by rkennedy »

What is the result if you run the script on the client machine without NRPE?
Former Nagios Employee
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: Check_Eximailqueue query returned no output!

Post by rlinux57 »

Code: Select all

./check_eximailqueue -w 3 -c 4
Mailqueue OK - 0 messages on queue
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check_Eximailqueue query returned no output!

Post 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?
Former Nagios Employee
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: Check_Eximailqueue query returned no output!

Post 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*
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check_Eximailqueue query returned no output!

Post 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?
Former Nagios Employee
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: Check_Eximailqueue query returned no output!

Post by rlinux57 »

I have changed it to nagios.nagios but still same issue.

I have run that command as root user.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check_Eximailqueue query returned no output!

Post by rkennedy »

Can you try running the command as nagios and post the result?
Former Nagios Employee
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: Check_Eximailqueue query returned no output!

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_Eximailqueue query returned no output!

Post 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.
Locked