Notifications - Notify A, then A & B, then A & B & C.

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
sixarm
Posts: 12
Joined: Sat Apr 07, 2012 5:05 am

Notifications - Notify A, then A & B, then A & B & C.

Post by sixarm »

Hi,

I'm getting to the end of my Nagios implementation and I'm trying to tie up a few loose ends to do with notifications. At present myself and a colleague are the only defined contacts within Nagios and we're both members of the default 'admins' group. What I'm looking to achieve is to add a further two groups and then have notifications sent to each group in turn.

For example, for the 1st notification send to 'admins', for the 2nd notification send to 'admins' & 'managers', for the 3rd notification to infinity send to 'admins', 'managers' & 'directors'.

I've seen an example of this using the escalation command, but this would appear to only apply to a specific host/hostgroup or service/servicegroup, is that correct? Is there no way to apply this method to all notifications?
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Notifications - Notify A, then A & B, then A & B & C.

Post by agriffin »

You can use wildcards for specifying both your host and service in your service escalation. Go here and scroll down approx. one screen for more information.
sixarm
Posts: 12
Joined: Sat Apr 07, 2012 5:05 am

Re: Notifications - Notify A, then A & B, then A & B & C.

Post by sixarm »

Awesome, I'd not spotted those wildcards.

So to notify everything in the same manner would I need to create a single host escalation and a single service escalation, as below:

Code: Select all

define hostescalation{
        host_name                *
        }

define serviceescalation{
        host_name                *
        service_description      *
        }
Would that work?
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Notifications - Notify A, then A & B, then A & B & C.

Post by agriffin »

Looks fine to me.
sixarm
Posts: 12
Joined: Sat Apr 07, 2012 5:05 am

Re: Notifications - Notify A, then A & B, then A & B & C.

Post by sixarm »

Thanks for the rapid response, I'm glad that is achievable.

I'm having a bit of a rethink regarding notifications and I'd like to achieve the following.

Default behaviour: notify by email to GroupA, GroupB & GroupC.
Behaviour for 'critical-hosts' Host Group and 'critical-services' Service Group: notify by email and SMS, 1st notification to GroupA, 2nd notification to GroupA & GroupB, 3rd notification to infinity to GroupA, GroupB & GroupC.

As per my other thread I have the SMS & email side setup, but everything is only going to the GroupA contact group at the moment. I would like to have this tiered notification approach but only with those specific host and service groups.

I'm not too sure how to approach this, any advice would be really appreciated.
sixarm
Posts: 12
Joined: Sat Apr 07, 2012 5:05 am

Re: Notifications - Notify A, then A & B, then A & B & C.

Post by sixarm »

After a lot of head scratching I managed to achieve what I stated above.

- First of all I defined the default contact groups for non-critical hosts within the existing host/templates.
- I then created a new host template for each set of 'critical' hosts and defined the contact group here as only GroupA.
- I then changed my 'critical' hosts to reference the new host template. All that was then required was to setup the escalation process, which was very straight forward.

Pretty simple once I'd got my head around it. :)
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Notifications - Notify A, then A & B, then A & B & C.

Post by agriffin »

It's good to see you figured out a solution that works for you!
Locked