Page 1 of 1

Timeperiod not working

Posted: Wed Feb 25, 2015 6:59 pm
by pch
Hello all

I have host defined in the hosts.cfg with the following timeperiod. Basically for testing I don't want any notification from this server. However I am still receiving emails when there is a issue on the host web1-udev inspite of specifying check_period => no-notification.

Please help me I have tried a lot. May be I am missing something.

define timeperiod{
timeperiod_name no-notification
alias No Notification
sunday 00:00-24:00 ; Every Sunday of every week
monday 00:00-00:00 ; Every Monday of every week
tuesday 00:00-00:00 ; Every Tuesday of every week
wednesday 00:00-00:00 ; Every Wednesday of every week
thursday 00:00-00:00 ; Every Thursday of every week
friday 00:00-00:00 ; Every Friday of every week
saturday 00:00-24:00 ; Every Saturday of every week




define host{
name linux-box-nonimp ; Name of this template
use generic-host ; Inherit default values
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
check_command check-host-alive
notification_period no-notification
notification_interval 10
notification_options d,r
contact_groups offpeak-contact-admins
register 0 ; DONT REGISTER THIS IS A TEMPLATE
}


define host{
use linux-box-nonimp ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name web1-udev
alias Web
address 192.168.16.231
check_period no-notification
}

Re: Timeperiod not working

Posted: Thu Feb 26, 2015 10:35 am
by jdalrymple
It looks like from your timeperiod definition you want alerts only from 12:00AM Satruday until 12:00AM Monday?

If so you should adjust your timeperiod to read like this:

Code: Select all

define timeperiod{
timeperiod_name no-notification
alias No Notification
sunday 00:00-24:00 ; Every Sunday of every week
saturday 00:00-24:00 ; Every Saturday of every week
}

Re: Timeperiod not working

Posted: Thu Feb 26, 2015 6:30 pm
by pch
No basically I don't really want to receive any emails on the weekend.

Am I right by setting

00:00-00:00

Also in terms of priority if I put the check_period on the host.cfg will it overwrite what is there in the service.cfg. For example if I set check_period=no-notification at the host level and at the service level I say check_period=workhours. Which one do you think will take the priority.

Re: Timeperiod not working

Posted: Thu Feb 26, 2015 6:46 pm
by Box293