Page 1 of 2

nrpe + check_mail

Posted: Thu Apr 22, 2010 5:20 am
by renavas
Hi.-

I have a problem and not how to fix it .-

Apparently it should work:
./check_eximailqueue -w 200 -c 500
Mailqueue OK - 20 messages on queue

But with no nrpe:
/usr/local/nagios/libexec/check_nrpe -H localhost -c check_mailq
CHECK_NRPE: Socket timeout after 10 seconds.

What is the problem?

Re: nrpe + check_mail

Posted: Thu Apr 22, 2010 9:41 am
by tonyyarusso
Does NRPE work for other checks? Could you be a little clearer about exactly what is going on?

Re: nrpe + check_mail

Posted: Thu Apr 22, 2010 9:48 am
by mmestnik
Check nrpe versions(client/server), they should be close if not matching. I'm assuming this happens with every check?

Re: nrpe + check_mail

Posted: Thu Apr 22, 2010 8:33 pm
by renavas
tonyyarusso wrote:Does NRPE work for other checks? Could you be a little clearer about exactly what is going on?
The NRPE works very well with the other services .-

With alterations are produced error check_eximailqueue

Re: nrpe + check_mail

Posted: Thu Apr 22, 2010 8:35 pm
by renavas
mmestnik wrote:Check nrpe versions(client/server), they should be close if not matching. I'm assuming this happens with every check?
Only the error occurs check_eximailqueue

Re: nrpe + check_mail

Posted: Thu Apr 22, 2010 9:50 pm
by mmestnik
You will need to more closely match the conditions you use in your testing with that of what NRPE is doing. I'd also check to see if the command behaves as a Nagios plugin, though this is not likely your problem.

Things to look for: Username/group membership. Environment variables, PATH comes to mind. Current working directory.

Re: nrpe + check_mail

Posted: Sat Apr 24, 2010 5:33 am
by renavas
Hi.-

This is the error I see:
sudo(pam_unix)[25517]: authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=nagios


With check_load works well
/usr/local/nagios/libexec/check_nrpe -H localhost -c check_load
OK - load average: 0.15, 0.09, 0.02|load1=0.150;15.000;30.000;0; load5=0.090;10.000;25.000;0; load15=0.020;5.000;20.000;0;

Re: nrpe + check_mail

Posted: Sat Apr 24, 2010 11:05 am
by renavas
Hi.-

I solved the problem with the following line in /etc/sudoers:
nagios ALL=NOPASSWD:/usr/sbin/exim

Re: nrpe + check_mail

Posted: Sat Apr 24, 2010 11:07 am
by renavas
Hi.-

Now I have another problem .-

I'm doing the same on another server but now it produces the following error:
/usr/local/nagios/libexec/check_nrpe -H localhost -c check_mailq
Mailqueue WARNING - query returned no output!

Re: nrpe + check_mail

Posted: Mon Apr 26, 2010 12:03 pm
by mmestnik
renavas,
Could you provide details on both of these hosts? What OS/Version where did you get it, how did you get nrpe installed how did you get the Nagios plugins installed, etc, etc, etc.

We would like this information to help make out packaging of the Linux-Agent better, so please provide any notes you have on the process and pit-falls you had to go through.

Thank you.