timeperiod not working ..

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

timeperiod not working ..

Postby rleon » Tue Jun 16, 2020 1:56 pm

Hi everyone

Coming from a xymon / hobbit user
I just installed nagios core for the first time .. and i have to say I LOVE it so far.

Just need to get used to how it works but its doing the job and its user friendly.

However I am having issues with the timeperiod parameter.

I have searched tried .. restarted etc and still my timeperiods are not working as expected ..
I am guessing I have a config issue going on or what I am expect to see is wrong.

I defined a timeperoid in timeperiods.cfg ..
This is set up to only check from 5am to 530am .. once a day monday - friday.

Code: Select all
define timeperiod {

    name                    ilo-time-slots
    timeperiod_name         ilo-time-slots
    alias                   iLO Time Slots
    monday                  05:00-05:30
    tuesday                 05:00-05:30
    wednesday               05:00-05:30
    thursday                05:00-05:30
    friday                  05:00-05:30


I have the time period specified like so.

Code: Select all
define host {

    name                            linux-ilo             ; The name of this host template
    use                             generic-host          ; This template inherits other values from the generic-host template
    check_period                    ilo-time-slots        ; By default, Linux hosts are checked round the clock
    check_interval                  25                    ; Actively check the host every 5 minutes
    retry_interval                  30                    ; Schedule host check retries at 1 minute intervals
    max_check_attempts              1                     ; Check each Linux host 10 times (max)
    check_command                   check-host-alive      ; Default command to check Linux hosts
    notification_period             ilo-time-slots             ; Linux admins hate to be woken up, so we only notify during the day
                                                          ; Note that the notification_period variable is being overridden from
                                                          ; the value that is inherited from the generic-host template!
    notification_interval           120                   ; Resend notifications every 2 hours
    notification_options            d,u,r                 ; Only send notifications for specific host states
    contact_groups                  admins                ; Notifications get sent to the admins by default
    register                        0                     ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!

when I look at the host it says
Next Scheduled Active Check: 06-16-2020 12:01:39

I am expecting it to say 5am per the time period.

Or am I missing something?


Looking forward to getting to know nagios and the rest of the nagios community.
Posts: 2
Joined: Tue Jun 16, 2020 12:56 pm

Re: timeperiod not working ..

Postby rleon » Tue Jun 16, 2020 2:09 pm

I also updated this .. to 1 and didnt see any difference.

(wasnt too clear what it did.)

Code: Select all
# This setting determines whether or not Nagios will retain
# the scheduling info (next check time) for hosts and services
# based on the values saved in the retention file.  If you
# If you want to use retained scheduling info, set this
# value to 1.  If not, set this value to 0.

Posts: 2
Joined: Tue Jun 16, 2020 12:56 pm

Return to Community Support

Who is online

Users browsing this forum: penukulak and 16 guests