Timeperiod exclusion not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Timeperiod exclusion not working

Post by Fred Kroeger »

Hi all
I am having problems with a timeperiod exclusion not working as expected.
I have setup a 24x7 timeperiod and another timeperiod with the times to be excluded.

Code: Select all

define timeperiod {
        timeperiod_name                         Non-Backup Periods
        alias                                   24x7 except during backups
        exclude                                 Backup Periods
        tuesday                                 00:00-24:00
        wednesday                               00:00-24:00
        thursday                                00:00-24:00
        friday                                  00:00-24:00
        saturday                                00:00-24:00
        sunday                                  00:00-24:00
        monday                                  00:00-24:00
        }


define timeperiod {
        timeperiod_name                         Backup Periods
        alias                                   Backup Periods
        wednesday                               18:00-24:00
        wednesday                               00:00-02:00
        tuesday                                 18:00-24:00
        tuesday                                 00:00-02:00
        monday                                  18:00-24:00
        monday                                  00:00-02:00
        thursday                                00:00-02:00
        thursday                                18:00-24:00
        friday                                  00:00-02:00
        friday                                  18:00-24:00
        saturday                                00:00-02:00
        saturday                                18:00-24:00
        sunday                                  00:00-02:00
        sunday                                  18:00-24:00
        }
I set my Service Notifications timeperiod with 'Non Backup Timeperiod" expecting that the exclude will stop any notifications during the "Backup Periods" - however it doesn't, I'm still getting notifications during the Backup Period times.
Researching this through my good friend google, I found another person with the same issue who posted the following in June last year:
Eventually I found my way into the Nagios Core bug database and found this entry. The resolution, added by user egalstad was:

Known issue. Exclude statement don’t work they way they were originally intended. No idea if a patch will be available. :-(
I'm running Nagios XI 2012R2.0 and this is definitely still an issue for me.

Regards... Fred
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Timeperiod exclusion not working

Post by lmiltchev »

You are correct - timeperiod exclusions don't work as they are supposed to, but this happens only if timeperiods have the same precedence. You can use exclusions if you are using "specific" periods (not in the "monday 00:00-02:00" format).

We are looking into this issue, but it's rather complicated, so I am not sure how soon this can (or if) be fixed.

Meanwhile, I would recommend not using exclusions in this particular case at all. You could simply modify your "Non-Backup Periods" timeperiod to be:

Code: Select all

monday     02:00-18:00
tuesday    02:00-18:00
wednesday  02:00-18:00
thursday   02:00-18:00
friday     02:00-18:00
saturday   02:00-18:00
sunday     02:00-24:00
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Timeperiod exclusion not working

Post by Fred Kroeger »

Thanks - I had implemented your proposed solution as a work-around.
I guess it has just become a permanent solution.

Fred
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Timeperiod exclusion not working

Post by lmiltchev »

:)
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked