Check_Eximailqueue query returned no output!
Re: Check_Eximailqueue query returned no output!
In my case i.e "/usr/sbin/exim" , i have already set that path in script.
Re: Check_Eximailqueue query returned no output!
Ok, let's check sudoers and make sure it's a valid configuration:
Code: Select all
sudo -v
Re: Check_Eximailqueue query returned no output!
Getting no output.
Re: Check_Eximailqueue query returned no output!
Ah, I think I see, change your /etc/sudoers entry from this:
To this:
It's because it's trying to sudo -u (run it as a different user).
Code: Select all
nagios ALL=NOPASSWD:/usr/sbin/exim
Code: Select all
nagios ALL=(ALL) NOPASSWD:/usr/sbin/exim
Re: Check_Eximailqueue query returned no output!
I have change it as per your direction but no effect.
Moreover i have using xinetd on client machine:
I have also restart both services nrpe and xinetd after any change.
Moreover i have using xinetd on client machine:
Code: Select all
cat /etc/xinetd.d/nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/sbin/nrpe
server_args = -c /etc/nagios/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = NMS IP Address
}
Re: Check_Eximailqueue query returned no output!
Try running these commands on the remote server and see what the output gives you:
Essentially, what it does is it runs that command and puts the output into a variable, it then checks the variable to see if the output is NULL and if it is it throws the error you are seeing.
Code: Select all
su - nagios
/usr/bin/sudo -u root /usr/sbin/exim -bpc
Re: Check_Eximailqueue query returned no output!
Code: Select all
root@server [~]# su - nagios
Last login: Mon Feb 29 20:36:43 CET 2016 on pts/0
This account is currently not available.
root@server [~]# cat /etc/passwd | grep nagios
nagios:x:988:984::/var/spool/nagios:/sbin/nologin
Code: Select all
root@server [/usr/lib64/nagios/plugins]# sudo -u nagios exim -bpc
exim: permission denied
Re: Check_Eximailqueue query returned no output!
What is the output of this:
Thank you
Code: Select all
chage -l nagios
Re: Check_Eximailqueue query returned no output!
Code: Select all
chage -l nagios
Last password change : Feb 24, 2016
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : -1
Maximum number of days between password change : -1
Number of days of warning before password expires : -1
Re: Check_Eximailqueue query returned no output!
Can you try changing your /etc/passwd for nagios to:
- Note: You may need to change /bin/bash to whatver the location is of the executable.
- Note: You may need to change /bin/bash to whatver the location is of the executable.
Code: Select all
nagios:x:988:984::/var/spool/nagios:/bin/bash