nrpe + check_mail

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
renavas
Posts: 7
Joined: Thu Apr 22, 2010 5:14 am

nrpe + check_mail

Post 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?
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: nrpe + check_mail

Post by tonyyarusso »

Does NRPE work for other checks? Could you be a little clearer about exactly what is going on?
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: nrpe + check_mail

Post by mmestnik »

Check nrpe versions(client/server), they should be close if not matching. I'm assuming this happens with every check?
renavas
Posts: 7
Joined: Thu Apr 22, 2010 5:14 am

Re: nrpe + check_mail

Post 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
renavas
Posts: 7
Joined: Thu Apr 22, 2010 5:14 am

Re: nrpe + check_mail

Post 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
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: nrpe + check_mail

Post 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.
renavas
Posts: 7
Joined: Thu Apr 22, 2010 5:14 am

Re: nrpe + check_mail

Post 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;
renavas
Posts: 7
Joined: Thu Apr 22, 2010 5:14 am

Re: nrpe + check_mail

Post by renavas »

Hi.-

I solved the problem with the following line in /etc/sudoers:
nagios ALL=NOPASSWD:/usr/sbin/exim
renavas
Posts: 7
Joined: Thu Apr 22, 2010 5:14 am

Re: nrpe + check_mail

Post 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!
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: nrpe + check_mail

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