check_period help?

Andrew Noonan anoonan at gmail.com
Mon Jun 29 19:19:14 CEST 2009


Hi all,

I've got a service that I'm trying to monitor with different
thresholds at different times of day.  To do this, I created two
timeperiods, covering 1:00am to 7:00am, and 7:00am to 1:00am (I
think), two service templates that each use these periods, and two
services that do the same check with differing thresholds, each
inheriting the different service template.  But when I look at the
scheduling for these two services, it's almost opposite what I think
it should be.  The 'late' service is next scheduled at 00:00 and the
'normal' service is scheduled at 1:00am.  I'm running 3.0.6.  The
other templates used do not change the check_period, except for the
generic-service template.  Here are the definitions:

################ Time periods #################
define timeperiod {
        timeperiod_name                         7a-1a_every_day
        alias                                   from 7:00am to 1:00am
        tuesday                                 00:00-00:59,7:00-24:00
        wednesday                               00:00-00:59,7:00-24:00
        sunday                                  00:00-00:59,7:00-24:00
        thursday                                00:00-00:59,7:00-24:00
        saturday                                00:00-00:59,7:00-24:00
        monday                                  00:00-00:59,7:00-24:00
        friday                                  00:00-00:59,7:00-24:00
        }

define timeperiod {
        timeperiod_name                         1a-7a_every_day
        alias                                   1:00am to 7:00am
        tuesday                                 01:00-06:59
        thursday                                01:00-06:59
        sunday                                  01:00-06:59
        saturday                                01:00-06:59
        monday                                  01:00-06:59
        friday                                  01:00-06:59
        wednesday                               01:00-06:59
        }


####################### Service Templates ######################
define service {
       name                                     Time-1a_to_7a
       check_period                             7a-1a_every_day
       register                                 0

}

define service {
       name                                     Time-7a_to_1a
       check_period                             1a-7a_every_day
       register                                 0

}

################### Services #####################

define service {
        host_name                       US
        service_description             index
        use
Freq-15-min-check,graphing_service_pnp,Time-7a_to_1a,generic-service
        check_command                   <Check command here>
        register                        1
        }

define service {
        host_name                       US
        service_description             lateindex
        use
Freq-15-min-check,graphing_service_pnp,Time-1a_to_7a,generic-service
        check_command                   <Check command here>
        register                        1
        }

Thanks,
Andrew

------------------------------------------------------------------------------
_______________________________________________
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