I posted this to nagios-users too, I’m running to a problem with submit_check_result…
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