Defining the two commands with which the noncentral instances send their results to the Nagios main server in most cases involves scripts that are based on
send_nsca (see also the example in 14.4 Sending Test Results to the Server). For services, such a script would look like the following one, in this case called
#!/bin/bash # Script submit_service_check PRINTF="/usr/bin/printf" CMD="/usr/local/bin/send_nsca" CFG="/etc/nagios/send_nsca.cfg" HOST=$1 SRV=$2 RESULT=$3 OUTPUT=$4 $PRINTF "%b" "$HOST\t$SRV\t$RESULT\t$OUTPUT\n" | $CMD -H nagios -c $CFG
When run, the command expects four parameters on the command line in the correct order: the host monitored, the service name, the return value for ...