Re: [Nagios-users] check_period help?

2009-06-30 Thread Andrew Noonan
No one has any ideas on this, or am I just not posting the right info?

On Mon, Jun 29, 2009 at 12:19 PM, Andrew Noonananoo...@gmail.com wrote:
 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@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


Re: [Nagios-users] check_period help?

2009-06-30 Thread Andreas Ericsson
Andrew Noonan wrote:
 No one has any ideas on this, or am I just not posting the right info?
 
 On Mon, Jun 29, 2009 at 12:19 PM, Andrew Noonananoo...@gmail.com wrote:
 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
thursday00:00-00:59,7:00-24:00
saturday00: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
thursday01:00-06:59
sunday  01:00-06:59
saturday01: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

 }


This looks decidedly odd. Time-7a_to_1a uses the check_period
1a-7a_every_day. Either you were very confused when you named
the timeperiods or you were very confused when you created these
templates. Or you just want to confuse everyone else ;-)

I'm guessing they should be reversed, no?

-- 
Andreas Ericsson   andreas.erics...@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

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


Re: [Nagios-users] check_period help?

2009-06-30 Thread Andrew Noonan
Ah, yes.  That would be the danger of using a GUI, I suppose.  You're
absolutely correct, I clicked on the wrong one when setting these up.
Confusing everyone else was just a fun side-effect.  That being said,
I went ahead and changed those so they match up, but I'm still seeing
strange behavior.  The index service is next scheduled at 1:00am, and
the lateindex service is next scheduled at 8:45am (it's 8:40am now
here).  I would have expected those services to be properly
rescheduled to basically the exact opposite.  The lateindex should be
1:00am and the index service should be the currently running service.
And yes, I did check to make sure that the index service is running
the correct service template and vice versa :)  Do I need to do
something to reset the scheduler over then a reload?

Andrew



 This looks decidedly odd. Time-7a_to_1a uses the check_period
 1a-7a_every_day. Either you were very confused when you named
 the timeperiods or you were very confused when you created these
 templates. Or you just want to confuse everyone else ;-)

 I'm guessing they should be reversed, no?

 --
 Andreas Ericsson                   andreas.erics...@op5.se
 OP5 AB                             www.op5.se
 Tel: +46 8-230225                  Fax: +46 8-230231

 Considering the successes of the wars on alcohol, poverty, drugs and
 terror, I think we should give some serious thought to declaring war
 on peace.


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


[Nagios-users] check_period help?

2009-06-29 Thread Andrew Noonan
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
thursday00:00-00:59,7:00-24:00
saturday00: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
thursday01:00-06:59
sunday  01:00-06:59
saturday01: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
register1
}

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
register1
}

Thanks,
Andrew

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