Recoveries notifications on warning not sent

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
yann.fertat
Posts: 2
Joined: Fri Dec 20, 2013 5:38 am

Recoveries notifications on warning not sent

Post by yann.fertat »

Hi

I am having an issue with the notifications on some services: after a warning, the recovery notification is not sent.

Here are the relevant parts of my configuration:

Code: Select all

# nagios.cfg
log_notifications=1
enable_notifications=1

# generic-service
define service{
        name                            generic-service
        [...]
        notification_options            w,u,c,r
        notification_interval           120
        notification_period             24x7
        [...]
        }

# service definition
define service{
    use                                  generic-service
    host_name                       my_host
    service_description           my_service
    check_command               mycheck!params
    contact_groups                 my_contact
}
Here is what I see under the notification panel in Nagios:

Code: Select all

my_host my_service      WARNING 12-17-2013 12:40:54     my_contact      notify-by-email WARNING: Last mail 60 60 minutes SLA
And the alert history:

Code: Select all

December 17, 2013 13:00

Service Ok[12-17-2013 13:10:53] SERVICE ALERT: my_host;my_service;OK;HARD;3;OK: No critical service, Last mail 0 minutes, HTTP OK, Ndo is up to date 1 > 3600 seconds SLA

December 17, 2013 12:00

Service Warning[12-17-2013 12:40:53] SERVICE ALERT: my_host;my_service;WARNING;HARD;3;WARNING: Last mail 60 > 60 minutes SLA
Service Warning[12-17-2013 12:39:53] SERVICE ALERT: my_host;my_service;WARNING;SOFT;2;WARNING: Last mail 60 > 60 minutes SLA
Service Warning[12-17-2013 12:38:53] SERVICE ALERT: my_host;my_service;WARNING;SOFT;1;WARNING: Last mail 60 > 60 minutes SLA
I'm using Nagios 3.4.4

Do you know if there is another option that could prevent some notifications from being sent?
I searched the changelog for newer versions, but I couldn't find anything about that kind of problem.

Any help will be greatly appreciated!
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Recoveries notifications on warning not sent

Post by sreinhardt »

Could you post the contact configuration as well please, feel free to remove the mail address.
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.
yann.fertat
Posts: 2
Joined: Fri Dec 20, 2013 5:38 am

Re: Recoveries notifications on warning not sent

Post by yann.fertat »

Thanks for you quick answer, I think this led me to something:

The contact is in fact a contact group, here is the configuration:

Code: Select all

define contactgroup{
        contactgroup_name       my_group
        members                      contactA, contactB
        }

define contact{
       contact_name                    contactA
       service_notification_period     24x7
       host_notification_period        24x7
       service_notification_options    c,r
       host_notification_options       d,u,r
       service_notification_commands   notify-by-alertit,notify-by-rss
       host_notification_commands      host-notify-by-alertit,host-notify-by-rss
       email                          ...
       }

define contact{
       contact_name                    contactB
       service_notification_period     24x7
       host_notification_period        24x7
       service_notification_options  w,u
       host_notification_options  n
       service_notification_commands   notify-by-email,notify-by-rss
       host_notification_commands      host-notify-by-email,host-notify-by-rss
       email                           ...
        }
As you can see, I think I'm missing something here!

- Does the contact definition override the service definition?
- Does a notification for warning recovery get sent if I have "c,r" ? Or only critical recoveries will get sent in that case?

Anyway, thank for your answer, I think the misconfiguration lies here!

I will perform some tests on monday and update this post as soon as I found the culprit!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Recoveries notifications on warning not sent

Post by slansing »

No you will only be notified for the notification options you specified. Your contact definition does not have anything that would override a service, but it does use all the options you defined in it.
Locked