submit_check_result problem

Bill Stevenson monitoring_with_nagios at yahoo.com
Sun Aug 28 04:37:56 CEST 2005


This an attempted distributed configuration with
Nagios 2.0b2 on FreeBSD.

Update:  The problem is submit_check_result is sending
the wrong data...somewhat. 


Here's an entry from /var/log/messages on the
distributed server(send_nsca debug is on): 

Aug 27 20:45:20 nagios3 nsca[58000]: SERVICE CHECK ->
Host Name: 'w2k-813', Service Description: 'submit',
Return Code: '0', Output: '1 data packet(s) sent to
host successfully.'

Here's the entry from /var/spool/nagios/nagios.log on
the central server: 

[1125193534] EXTERNAL COMMAND:
PROCESS_SERVICE_CHECK_RESULT;w2k-813;submit;0;1 data
packet(s) sent to host successfully.

My submit_check_result command is this: 

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

I changed from '$OUTPUT$' to '$SERVICEOUTPUT$' to see
what would happen now this Output: '1 data packet(s)
sent to host successfully.' is send to the server
instead of this Output: '$OUTPUT$'

My submit_check_result contains: 

/usr/bin/printf "%s\t%s\t%s\t%s\n" "$1" "$2"
"$return_code" "$4" |
/usr/local/libexec/nagios/send_nsca 192.168.11.27 -c
/usr/local/etc/nagios/send_nsca.cfg


On the Nagios central server I have
accept_passive_service_checks=1

And on the distributed server I have 
obsess_over_services=1
and 
ocsp_command=submit_check_result

According to the http interface, all services are in
PENDING status. This most likely a dumb question among
many, but is this caused by the incorrect format being
submitted by the distributed server?

Thanks,
Bill

--- Bill Stevenson <monitoring_with_nagios at yahoo.com>
wrote:

> Hey everyone -- I'm having a problem with
> submit_check_result. I'm attempting to setup a
> distributed configuration with Nagios 2.0. On the
> distributed server I have
> 
> obsess_over_services=1
> ocsp_command=submit_check_result 
> 
> and from the submit_check_result script: 
> 
> /usr/bin/printf "%s\t%s\t%s\t%s\n" "$1" "$2"
> "$return_code" "$4" |
> /usr/local/libexec/nagios/send_nsca 192.168.11.27 -c
> /usr/local/etc/nagios/send_nsca.cfg
> 
> and in the checkcommands.cfg: 
> 
> define command{
> 	command_name	submit_check_result
> 	command_line
> /usr/local/libexec/nagios/submit_check_result
> $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATE$ '$OUTPUT$'
> 	}
> 
> 
> Here seems to be the problem, i never get a
> PROCESS_SVC_CHECK_RESULT command entered. I have
> debugging turned on for nsca and when watch
> /var/log/messages on the central server I see this
> entry: 
> 
> Aug 27 15:33:13 nagios3 nsca[10900]: SERVICE CHECK
> ->
> Host Name: 'w2k-813', Service Description: 'submit',
> Return Code: '0', Output: '$OUTPUT$'
> Aug 27 15:33:13 nagios3 nsca[10900]: End of
> connection...
> 
> This is all running on FreeBSD as well. Is there
> something wrong with printf or one of the variables?
> As you can tell, i'm not very good with shell
> programming. If there is any more information I can
> provide, please let me know. Any insight at all into
> this problem would be very much appreciated.
> 
> Thanks,
> Bill
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
> 
>
-------------------------------------------------------
> SF.Net email is Sponsored by the Better Software
> Conference & EXPO
> September 19-22, 2005 * San Francisco, CA *
> Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects
> & Teams * Testing & QA
> Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> _______________________________________________
> 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
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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