I have OCSP working as it should. It's reporting back services and their status 
properly.

I've activated OCHP pointing to a different shell script that takes 1 less 
argument than the OCSP does but still does the status conversion to a valid 
numeral.

Anyway. Manually, I can use the submit_check_result_host script and the central 
icinga will process the result and show it. However, the distributed server 
doesn't seem to send one at all.



obsess_over_hosts=1
ochp_command=submit_check_result_host


Submit_check_result_host
#!/bin/sh

# Arguments:
#  $1 = host_name (Short name of host that the service is
#       associated with)
#  $2 = state_string (A string representing the status of
#       the given service - "OK", "WARNING", "CRITICAL"
#       or "UNKNOWN")
#  $3 = hostoutput (A text string that should be used
#       as the output for the host command checks)
#

# Convert the state string to the corresponding return code
return_code=-1

case "$2" in
    OK)
        return_code=0
        ;;
    WARNING)
        return_code=1
        ;;
    CRITICAL)
        return_code=2
        ;;
    UNKNOWN)
        return_code=-1
        ;;
esac

# pipe the service check info into the send_nsca program, which
# in turn transmits the data to the nsca daemon on the central
# monitoring server

#/usr/bin/printf "%s\t%s\t%s\n" "$1" "$return_code" "$3" | 
/usr/local/icinga/bin/send_nsca -H www.kd-ops.se -c 
/usr/local/icinga/etc/send_nsca.cfg
/usr/bin/printf "%s\t%s\t%s\n" "$1" "$return_code" "$3" >> 
/usr/local/icinga/var/temp_nsca_icinga.log
/usr/bin/printf "%s\t%s\t%s\n" "$1" "$return_code" "$3" | 
/usr/local/icinga/bin/send_nsca -H www.kd-ops.se -c 
/usr/local/icinga/etc/send_nsca.cfg >> 
/usr/local/icinga/var/temp_nsca_icinga.log


An output of temp_nsca_icinga.log shows;

CLX_xxxx       -1      CRITICAL - Host Unreachable (192.168.220.10)
1 data packet(s) sent to host successfully.

So it's sending it... but the central icinga is not processing it properly.

However, manually running the parameters above immediately yields a result on 
the central server. The permissions on the script are the same as the 
service-check script.

-rwxr-xr-x 1 icinga icinga   1190 2011-06-03 16:21 submit_check_result
-rwxr-xr-x 1 icinga icinga   1216 2011-07-08 16:44 submit_check_result_host

I've run the script as a regular user, as root and as icinga... every time the 
check goes through properly when doing it manually. Never automatically.

On the central icinga when a host check comes in automatically looks like this;
Jul 11 14:34:08 Kxxxxx icinga: EXTERNAL COMMAND: 
PROCESS_HOST_CHECK_RESULT;CLX_xxxx;-1;CRITICAL - Host Unreachable 
(192.168.220.10)

A manual check looks like this;
Jul 11 14:35:26 Kxxxxx icinga: EXTERNAL COMMAND: 
PROCESS_HOST_CHECK_RESULT;CLX_xxxx;0;Manuell OK

Even replicating the status sent by the icinga yields immediate results. It's 
sending "UNKNOWN", so even doing that works manually....

Help??

//Marko V
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to