Problem: Distributed Monitoring "Status Information" = $OUTPUT$

nlehouil at telusplanet.net nlehouil at telusplanet.net
Fri Sep 16 16:59:15 CEST 2005


Hi all,
 
I need a little help with this one.  I have setup distributed monitoring within 
a test environment.  I have one box configured as a remote sending its status 
checks using nsca.  I also have a central monitoring box configured that 
accepts the remote boxes send_nsca's.
 
The problem is that it shows the following in the central server's nagios.log:

[1126844773] EXTERNAL COMMAND: 
PROCESS_SERVICE_CHECK_RESULT;remote;PING;0;$OUTPUT$
[1126844833] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;remote;Root 
Partition;0;$OUTPUT$
[1126844893] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;remote;Total 
Processes;-1;$OUTPUT$
[1126844953] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;remote;Current 
Load;0;$OUTPUT$
[1126845013] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;remote;Current 
Users;0;$OUTPUT$
[1126845073] EXTERNAL COMMAND: 
PROCESS_SERVICE_CHECK_RESULT;remote;PING;0;$OUTPUT$

$OUTPUT$ should be "PROCS OK: 50 processes"
 
Here is the commands in the checkcommands.cfg:
#############################################################
define command{
        command_name    submit_check_result
        
command_line    /usr/local/nagios/libexec/eventhandlers/submit_check_result 
$HOSTNAME$ '$SERVICEDESC$' $SERVICESTATE$ '$OUTPUT$'
        }

define command{
        command_name    check_local_procs
        command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
        }
#############################################################
Here is the output from the submit_check_result:
 
        #!/bin/sh
 
        # Arguments:
        #  $1 = host_name (Short name of host that the service is
        #       associated with)
        #  $2 = svc_description (Description of the service)
        #  $3 = state_string (A string representing the status of
        #       the given service - "OK", "WARNING", "CRITICAL"
        #       or "UNKNOWN")
        #  $4 = plugin_output (A text string that should be used
        #       as the plugin output for the service checks)
        #
 
        # Convert the state string to the corresponding return code
        return_code=-1
 
        case "$3" 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\t%s\n" "$1" "$2" "$return_code" "$4" 
| /usr/local/nagios/bin/send_nsca 192.168.45.76 -
c /usr/local/nagios/etc/send_nsca.cfg

##########################################################################
 
On the central server it show all the proper information except the check 
command output.  Why?
 
Any help is greatly appreciated.....
 
Thanks....
 
Neil





-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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