I would actually be willing to except this as an answer

here is the script I am using for submit_check_results

#!/bin/sh

# Arguments:
# $1 = host_name (Short name of the host that the service is associated with)
# $2 = svc_description (Description of the service)
# $3 = state_string (A string respresenting 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 check)
#
#
#
#

# 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 deamon 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 XXX.XXX.XXX.XXX -p XXXX -c /usr/local/nagios/etc/send_nsca.cfg

my command def is

define command{
       command_name    submit_check_result
command_line /usr/local/nagios/libexec/eventhandlers/submit_check_result $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATE$ '$OUTPUT$'
       }

Identical to the sample script in the 2.0 doco and the sample command definition i really just customized the ip and port







Mike Koponick wrote:
I actually had a similar issue last week with NSCA. It would time-out;
however I was able to telnet to the correct host/port.

The problem I found was that the macros were somehow incorrect for the
"submit_check" command that I used. For some reason, it showed that it
timed out, rather than showing an error of an incorrect macro.

Go figure.

Mike

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sumit
Malhotra
Sent: Tuesday, February 07, 2006 7:56 AM
To: [EMAIL PROTECTED]; 'Nagios users'
Subject: RE: [Nagios-users] NSCA messages

Should be ...to confirm...

telnet <central server> <port>

Where <port> is on which you have configured NSCA on <central server> -
most
probably 5667)

If it's getting timed out, it shouldn't respond.

Thanks.
Sumit
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Brady
Maxwell
Sent: Tuesday, February 07, 2006 9:18 PM
To: Nagios users
Subject: [Nagios-users] NSCA messages

I am getting stuff like this on my distributed server. It had been working and I do not think I changed anything.

Could this be because the distributed server can not reach the central server?


Feb 7 07:48:01 Netcarenagios nagios: Warning: OCSP command '/usr/local/nagios/libexec/eventhandlers/submit_check_result IVAN 'UPTIME' OK '$OUTPUT$'' for ser
vice 'UPTIME' on host 'IVAN' timed out after 5 seconds



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users@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



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users@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



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users@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

Reply via email to