Page 1 of 2

Setting notifications with multiple intervals/contacts/opts

Posted: Mon Jul 22, 2013 9:53 am
by jsharris
Here is our situation:

We need to have notification emails sent for a service but to different contacts dependent on the service state (w, c, etc.). For example we need all IT personnel to get emails for w, c, and r states with a repeat notification every 60 minutes and a ticket generation system to get only c state notifications with no repeats (only the initial notification). We have a large number of services to monitor like this so manually configuring each one is only a very last ditch option. Also, the service configuration itself does not appear to allow for multiple notification intervals depending on to which contact the email is being sent. If not for this we would control the notification options at the contact config instead of at the service config. In addition, the bulk modify tool does not provide a means to alter notification options.

Just to complicate things, some of the services currently have notification settings applied which need to remain in place.

What would be the best way to approach this problem? We are new to Nagios and are looking for any guidance we can get.

Thanks in advance.

Re: Setting notifications with multiple intervals/contacts/o

Posted: Mon Jul 22, 2013 9:58 am
by jsharris
Forgot to include this:

Nagios XI Installation Profile

System:
Nagios XI Version : 2012R2.2
xxxxxxxxxx.com 2.6.32-358.2.1.el6.x86_64 x86_64
CentOS release 6.4 (Final)
Gnome is not installed

Apache Information
PHP Version: 5.3.3
Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)
Server Name: xxxxxxxxx
Server Address: xxxxxxxxx
Server Port: 80

Date/Time
PHP Timezone: America/New_York
PHP Time: Mon, 22 Jul 2013 10:57:31 -0400
System Time: Mon, 22 Jul 2013 10:57:31 -0400

Re: Setting notifications with multiple intervals/contacts/o

Posted: Mon Jul 22, 2013 10:26 am
by BanditBBS
Use escalations and escalate the services to the ticketing system. Create a user in XI that has the ticketing system's email address and set the preferences for that account to only receive service critical messages.

In the escalation, just set the first_notification to 1 and also last notification to 1 and it will only send it once.

I think this idea will work.

Re: Setting notifications with multiple intervals/contacts/o

Posted: Mon Jul 22, 2013 10:49 am
by lmiltchev
Thanks, BanditBBS!

In addition to this, you can use the Escalation Wizard, which is part of the Nagios XI Enterprise Edition. It would save you time by creating escalations to many (or all) services at once.

Re: Setting notifications with multiple intervals/contacts/o

Posted: Mon Jul 22, 2013 10:57 am
by BanditBBS
lmiltchev wrote:Thanks, BanditBBS!

In addition to this, you can use the Escalation Wizard, which is part of the Nagios XI Enterprise Edition. It would save you time by creating escalations to many (or all) services at once.
Well, he could also do it by service group or service description as well. The configuration files would end up looking like these examples:

For all services in a specific hostgroup(s):

Code: Select all

define serviceescalation{
        hostgroup_name  whatever_hostgroup
        service_description *
        contact_groups  ticket_system
        first_notification      1
        last_notification       1
        notification_interval   15
        }
Specific servicegroup(s) on specific hostgroup(s)

Code: Select all

define serviceescalation{
        hostgroup_name  whatever_hostgroup
        servicegroup_name whatever_servicegroup
        contact_groups  ticket_system
        first_notification      1
        last_notification       1
        notification_interval   15
        }
You can of course play around with this setups, but wildcards do work. I just recommend using the "Write Config Files" and "Verify" buttons instead of "Apply configuration". As using the wildcards wrong will cause errors. You could do this under service escalations in CCM, but for some reason it does not support all the options available, so you may have to use static configuration files.

Re: Setting notifications with multiple intervals/contacts/o

Posted: Mon Jul 22, 2013 1:26 pm
by lmiltchev
@jsharris

Let us know if the recommendations, offered by BanditBBS solved your issue. Thanks!

Re: Setting notifications with multiple intervals/contacts/o

Posted: Wed Jul 24, 2013 12:26 pm
by jsharris
Many thanks, gentlemen. I'll look into the service escalation option and report back on how it goes.

Re: Setting notifications with multiple intervals/contacts/o

Posted: Wed Jul 24, 2013 12:28 pm
by slansing
Great! We will keep the thread open for you to let us know.

Re: Setting notifications with multiple intervals/contacts/o

Posted: Fri Jul 26, 2013 11:47 am
by jsharris
Haven't been able to do much but the first time through the escalation did not process. The regular notifications went through on the warning, critical, and recovery state changes but nothing went to the escalation email. I am going to go through it all again on Monday morning to be sure I set it up correctly. If I still have trouble I'll post how I have it configured.

Thank you all for your assistance.

Re: Setting notifications with multiple intervals/contacts/o

Posted: Fri Jul 26, 2013 12:57 pm
by lmiltchev
Sure, let us know if you have any more issues. If this is the case, you can post the serviceescalations.cfg, so that we can take a look at it.