Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have disabled notifications during certain time periods, like so:

define timeperiod{  
        timeperiod_name test  
        alias           Except test Hours  
        monday          08:20-08:15  
        sunday          08:20-08:15  

So if a service goes down between 08:15-08:20, I don't get notified via mail. It just happened today that the service remained down for another 2 hours, and I was expecting to get an email when it's back in the notification_period.
How do I tell Nagios to send a notification email if it fits the notification times and the state of the service is still Critical?

My first approach was incorrect, so I followed an advice and used exclude periods like so:

define timeperiod{
        timeperiod_name test2
        alias           test2
        use             24x7
        exclude         test

define timeperiod{
        timeperiod_name test
        alias           Except test Hours
        thursday        12:15-12:25   # it was thursday when I tested

and the service check:

define service{
        use                             generic-service
        service_description             TEST
        check_command                   check_nrpe!check_TEST
        notification_period            test2

and the service template:

define service{
        name                            generic-service
        active_checks_enabled           1              
        passive_checks_enabled          1              
        parallelize_check               1              
        obsess_over_service             1              
        check_freshness                 1              
        notifications_enabled           1              
        event_handler_enabled           1              
        flap_detection_enabled          0              
        failure_prediction_enabled      1              
        process_perf_data               1              
        retain_status_information       1              
        retain_nonstatus_information    1              
        is_volatile                     0              
        check_period                    24x7           
        max_check_attempts              2              
        check_interval                  120s           
        retry_interval                  60s            
        contact_groups                  admins         
        notification_options            w,u,c,r        
        notification_interval           120s           
        notification_period             24x7           
        register                        0              

But I still don't get notified. I do get notified, however, if I manually reschedule the service check OR if I reload nagios.

share|improve this question
Does it log anything specific when a notification doesn't go out due to time period restrictions? – Keith Oct 17 '13 at 15:16
no, it doesn't. – w00t Oct 21 '13 at 14:29
I think it will only reschedule for a valid time if the notification_interval is non-zero. But what exact version of Nagios are you running? – Keith Oct 21 '13 at 16:05
Indeed, someone suggested I use exclude periods. I'm updating my original message with what I did. Version is Nagios Core 3.2.3. – w00t Oct 24 '13 at 16:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.