Timeperiods not working as expected


I have the following timeperiod definition.

define timeperiod{
        timeperiod_name 		testperiod
        alias           		24 Hours A Day, 7 Days A Week, skip 4AM check
        sunday          		00:00-03:55,04:10-24:00
        monday          		00:00-03:55,04:10-24:00
        tuesday         		00:00-03:55,04:10-24:00
        wednesday       		00:00-03:55,04:10-24:00
        thursday        		00:00-03:55,04:10-24:00
        friday          		00:00-03:55,04:10-24:00
        saturday        		00:00-03:55,04:10-24:00

But I still get notifications for checks at 4AM. Am I going about this wrong?


did you reload after modifying the timetable?
Or did you possibly use “restart” instead?


I used restart. That has always worked for everything I’ve done. New timeperiods, servers, contacts, etc. I’ll try reload if that’s what it takes.


restart has often shown a wrong behaviour…

stop nagios, check for remainign processes (ps -ef | grep nagios) kill any survivng process, start.

use only reload or stop and then start… restart somehow leaves some processes alive sometimes… and that briugns to inconsistencies between the config and the interface :stuck_out_tongue:


I’ve now done, restart, reload, reboot and I’m still seeing the same problem. It just isn’t recognizing the gap in the time period. I don’t know if the retention.dat plays a role, but I deleted that today and rebooted. We’ll see.


Any suggestions on what might cause this? Tips to try?


are your timeperiods showing up correctly in the configuration tab?


They show up backwards, but it’s all there.

    sunday	04:10:00 - 24:00:00, 00:00:00 - 03:55:00 
monday	04:10:00 - 24:00:00, 00:00:00 - 03:55:00 
tuesday	04:10:00 - 24:00:00, 00:00:00 - 03:55:00 
wednesday	04:10:00 - 24:00:00, 00:00:00 - 03:55:00 
thursday	04:10:00 - 24:00:00, 00:00:00 - 03:55:00 
friday	04:10:00 - 24:00:00, 00:00:00 - 03:55:00 
saturday	04:10:00 - 24:00:00, 00:00:00 - 03:55:00


did you correctly assign the check_period to your services/hosts?



I have it set as notification_period. That’s how I have all my time periods specified. I don’t have any problems with time periods that are simple (e.g. 07:00-17:00). It’s when I add a gap that it doesn’t work.


No idea, sorry, i have a timeperiod with a gap and it works as expected (it show up inverted too i the config page).



I think I found my stupid mistake. I had the notification_period set on the service and not the host. The notifications I’m getting are host alerts. I think that will fix it.

Thanks for the input. It made me look at things more closely.


Well… that goes back to “good news” :slight_smile: