check_nrpe misbehaving?

Andreas Ericsson ae at op5.se
Fri Apr 22 12:00:11 CEST 2005


schnitzel meister wrote:
> Hello again,
> Thanks for your previous help, maybe you can help me again?
> 
> I'm having some trouble with check_mailq returning the wrong return
> code - but only when running over check_nrpe.
> 

It's a permission issue in 99.9% of the cases.

> To find out why, I ran the plugin on both the mail server and the
> nagios server from the command line.
> 
> On the mail server, I have:
>  while true; do
>   /usr/lib/nagios/plugins/check_mailq -w 50 -c 100
>   echo "Return: $?";
>   sleep 5;
>  done
> 

Are you running this as the user nrpe runs as? Does it give different 
output when run as root vs the nrpe user?

> and on the nagios box I have:
>  while true; do
>   /usr/lib/nagios/plugins/check_nrpe -n -H ip.goes.here -c check_mailq1;
>   echo "Return: $?";
>   sleep 5;
>  done
> 
> The mail server ALWAYS returns an "OK: mailq empty message", return code 3.
> check_nrpe on the nagios box also always returns an "OK: mailq empty
> message", but 20% of the time has a return code of 0.
> 
> Any ideas?
> 

Several.

1/ Permissions (see above).

2/ check_mailq seems broken, since it reports UNKNOWN but yet produces 
output which would lead one to think the mailqueue is empty (which it 
can't know if it returns UNKNOWN).

3/ You're running an MTA which check_mailq doesn't know how to check 
(links in to 2, since it's per definition broken for failing to report 
this).

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list