[Nagios-users] nsca PROCESS_HOST_CHECK_RESULT problem

Bratislav Stojkovic miskobs at yahoo.com
Tue Apr 3 13:07:53 UTC 2007


Hi.

I have problem regarding nsca and PROCESS_HOST_CHECK_RESULT. 
Actually I configure nsca using standard procedure and everything works fine except PROCESS_HOST_CHECK_RESULT.
(nagios 2.8, nsca 2.71)


- nagios.cfg

ocsp_command=send_service_check
ochp_command=send_host_check


 - cat /usr/lib/nagios/plugins/send_host_check
-------
#!/bin/sh
# Arguments:
# $1 = Hostname of the host (using the $HOSTNAME$ macro)
# $2 = Host Status ID of the host (using the $HOSTSTATUSID$ macro)
# $3 = Output of the host check (using the $HOSTOUTPUT$ macro)
/bin/echo "$1","$2","$3" | /usr/bin/send_nsca -H IP_ADDRESS -c /etc/nagios/send_nsca.cfg -d ","
-------------

- cat /usr/lib/nagios/plugins/send_service_check
--------------
#!/bin/sh
# Arguments:
# $1 = Hostname of the host (using the $HOSTNAME$ macro)
# $2 = Service Description of the service (using the $SERVICEDESC$ macro)
# $3 = Service Status ID of the service (using the $SERVICESTATUSID$ macro)
# $4 = Output of the service check (using the $SERVICEOUTPUT$ macro)
/bin/echo "$1","$2","$3","$4" | /usr/bin/send_nsca -H IP_ADDRESS -c /etc/nagios/send_nsca.cfg  -d ","
------------

- misccommands.cfg:
---------------
define command{
        command_name send_host_check
        command_line /usr/lib/nagios/plugins/send_host_check $HOSTNAME$ $HOSTSTATEID$ "$HOSTOUTPUT$"
}

define command{
        command_name send_service_check
        command_line /usr/lib/nagios/plugins/send_service_check $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATEID$ '$SERVICEOUTPUT$'
}
-------------
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!


Bratislav.

  ...gios-users at lists.sourceforge.n





 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nagios.com/pipermail/nagios-users/attachments/20070403/8dcbe82f/attachment.html>


More information about the Nagios-users mailing list