event handler issue

Cecchino, David David.Cecchino at qwest.com
Fri Dec 12 19:16:49 CET 2003


Hi,

I'm having problems with an event handler for schedule service checks,
when  I run the command I see the service check being submitted, but it
doesn't appear on the webpage for nagios and the time is not being
modified for the next service, wondering if anyone had an idea of the
syntax shown below is correct for the current version of nagios:


#!/bin/sh
# This script will write a command to the Nagios command
# file to cause Nagios to process a passive service check
# result.  Note: This script is intended to be run on the
# same host that is running Nagios.  If you want to 
# submit passive check results from a remote machine, look
# at using the nsca addon.
#
# Arguments:
#  $1 = host_name (Short name of host that the service is
#       associated with)
#  $2 = svc_description (Description of the service)
#  $3 = next_notification_time (Time of next notification)
# 

echocmd="/bin/echo"
CommandFile="/usr/local/nagios/var/rw/nagios.cmd"
datetime=`date +%s`
cmdline="[$datetime] SCHEDULE_SVC_CHECK;$1;$2;$3"
`$echocmd $cmdline >> $CommandFile`
############################################################3
I grabbed this script from event handler directory in the base source
installation of nagios.

this is how i run it , 
 ./schedule_service_check test-host Ping 1070288900

this is what i see in nagios.log 


[1071253051] EXTERNAL COMMAND:
SCHEDULE_SVC_CHECK;test-host;Ping;1070288900


The problem is that the website is not updating the new scheduled
service check time. 

Thanks,

David C 


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
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