NSCA Confusing host check results as service checks

Brian A. Seklecki lavalamp at spiritual-machines.org
Wed Nov 28 17:06:46 CET 2007


Original msg:

> Warning:  Passive check result was received for service '0' on host 
> 'server1', but the service could not be found!

NSCA daemon makes the host/service check determination based simply on the 
number of arguments.

If you take a remote nagios instance which is reporting passive 
host/service checks, you can bump the debugging_level=384 and see 
something like this:

[1196258852.155446] [256.1] [pid=20619] Running command 
'/usr/local/libexec/nagios/send_host_check fbsd05 0 'PING OK - Packet loss 
= 0%, RTA = 0.67 ms''...

In this case, there are the proper number of arguments: 3

But NSCA recieving this msg is seeing 4 arguments.

A closer look at /usr/local/libexec/nagios/send_host_check reveals why:

   #!/bin/sh

   /bin/echo "$1","$2","$3" | /usr/local/sbin/send_nsca -H master.tld \ -c
   /usr/local/etc/nagios/send_nsca.cfg -d ","


This means that depending on how shit is escaped within:
   - Nagios on remote node
   - /bin/sh
   - send_nsca binary

Therefore, a $3 value of:  'PING OK - Packet loss = 0%, RTA = 0.67 ms'

May or may not be truncated into three values.  I'm going to track it down 
further.

~BAS

---------- Forwarded message ----------
Date: Mon, 19 Nov 2007 13:52:21 -0500 (EST)
From: Brian A. Seklecki <lavalamp at spiritual-machines.org>
To: miskobs at yahoo.com
Cc: nagios-users at lists.sourceforge.net, chris at sigd.net
Subject: RE: [Nagios-users] nsca PROCESS_HOST_CHECK_RESULT problem


Bratislav:

Did you ever resolve these bizaare PROCESS_HOST_CHECK_RESULT / 
PROCESS_SERVICE_CHECK_RESULT errors?

I'm having trouble debugging them as well

~BAS


> If I simulate host down I got HOST_CHECK from nagios.log on remote host:

> EXTERNAL COMMAND: PROCESS_HOST_CHECK_RESULT;server1;1;PING CRITICAL - Packet 
> loss = 100%

> but regularly, it is triggered like it is service check, and 
> PROCESS_HOST_CHECK_RESULT is not performed at all.

> [1175605177] EXTERNAL COMMAND:
>  PROCESS_SERVICE_CHECK_RESULT;server1;0;0; RTA = 0.18 ms [1175605177] 
> Warning:  Passive check result was received for service '0' on host 
> 'server1', but the service could not be found!


l8*
 	-lava (Brian A. Seklecki - Pittsburgh, PA, USA)
 	       http://www.spiritual-machines.org/

     "Guilty? Yeah. But he knows it. I mean, you're guilty.
     You just don't know it. So who's really in jail?"
     ~Maynard James Keenan


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
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