timeperiod not behaving as expected

Assaf Flatto nagios at flatto.net
Wed Jul 28 16:15:09 CEST 2010


Carl Karsten wrote:
> I made that change, and also backed the end of the period off a min to
> avoid the race between the check and the ifdown.  /etc/init.d/nagios
> reload, still got an email every hour it was down:
>
> first: Date/Time: Tue Jul 27 20:03:34 CDT 2010
> last: Date/Time: Wed Jul 28 05:03:34 CDT 2010
> recovery notice: Date/Time: Wed Jul 28 06:03:34 CDT 2010
>
> define timeperiod{
>         timeperiod_name credit_card_hours
>         alias           when credit cards can be processed
>
>         sunday          06:00-19:59
>         monday          06:00-19:59
>         tuesday         06:00-19:59
>         wednesday       06:00-19:59
>         thursday        06:00-19:59
>         friday          06:00-19:59
>         saturday        06:00-19:59
>         }
>
>
>
> define host{
>         use                             linux-server    ; This
> template inherits other values from the generic-host template
>         host_name                       mcve.cteusa.com         ; The
> name of this host
>         hostgroups                      linux-servers
>         check_period                    credit_card_hours
>         check_interval                  5               ; Actively
> check the host every 5 minutes
>         retry_interval                  1               ; Schedule
> host check retries at 1 minute intervals
>         max_check_attempts              10              ; Check each
> Linux host 10 times (max)
>         check_command                   check-host-alive ; Default
> command to check Linux hosts
>         notification_period             credit_card_hours
>         notification_interval           60
>         notification_options            d,u,r           ; Only send
> notifications for specific host states
>         contact_groups                  admins          ;
> Notifications get sent to the admins by default
>         register                        1
>         }
>
> define service{
>         use             generic-service         ; Inherit default
> values from a template
>         host_name               mcve.cteusa.com
>         service_description     SMTP
>         check_command   check_smtp!-t 5
>         }
>   
>
You'll need to define the check time and notification time for the 
services too .



-- 
Never,Ever Cut A Deal With a Dragon 


Next year I will be doing the London to Paris bike ride to 
raise money for the DogTrust (www.dogtrust.co.uk) .
Please Sponsor me at http://www.justgiving.com/Assaf-Flatto


------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
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