Time periods not working as intended

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
brianp89
Posts: 18
Joined: Thu May 08, 2014 10:53 am

Time periods not working as intended

Post by brianp89 »

I set the time period for a check to be Thursday 11:35-11:45:

Code: Select all

define timeperiod {
        timeperiod_name                         zzTest
        alias                                   TestTime
        thursday                                11:35-11:45
        }

Code: Select all

define service {
        host_name                       server1
        service_description             Test file checker
        use                             generic-service
        check_command                   share-file-check!$USER3$!$USER4$!D$!downloads/test1/testfile-*!1440!0!!
        max_check_attempts              1
        check_interval                  10
        retry_interval                  2
        check_period                    zzTest
        notification_options            w,c,r,
        contacts                        user1
        register                        1
        }
When I refresh the service, the first check it shows will be @ 11:38. Why doesn't it know to start at 11:35?

Also, after it runs the check @ 11:38 it sets the next check for 11:48, which is outside the scope of the timeperiod. When it gets to 11:48, it doesn't run the check but sets the next check to be next Thursday @ 11:58 (again, outside the time period). This causes the check not to run correctly the next Thursday. Am I doing something wrong? I've got Nagios XI 2012R1.6.

Thanks
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Time periods not working as intended

Post by sreinhardt »

The time period definition never was intended to say that something would start at a definite time. This is because we can rarely if ever assure where nagios will be in scheduling things. However, I would have expected a check scheduled within the timeperiod to run properly, as the time period does dictate that if something is scheduled within the accepted period, it should be run. I'd like you to set the timeperiod window to at least 20 minutes. This will cause at least the first check(possibly not running) to get through its run, and a second that should be scheduled within the window run within to be set as well.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
brianp89
Posts: 18
Joined: Thu May 08, 2014 10:53 am

Re: Time periods not working as intended

Post by brianp89 »

Looks like you're right about the time window - as soon as I increased it to 25 minutes it started working as intended. I guess I'll just have to live with a bit of a longer check timeframe, not too big of a deal :)

Thank you
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Time periods not working as intended

Post by cmerchant »

Hope that works for you. We'll close this thread. Thanks.
Locked