2 escalations for the same host

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
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

2 escalations for the same host

Post by vvz »

Hi!
I have a host definition and 4 contacts - vassiliy-phone, mike-phone, vasiliy-backup-phone, mike-backup-phone
if today vassiliy-phone contact is on shift, then mike-backup-phone - is oncall, and vise versa - in timeperiods.
I have 2 contactgroups: admins-phone ( members: vassiliy-phone, mike-phone)
admins-onreserve-phone(members: vassiliy-backup-phone,mike-backup-phone)

I have also another 4 contacts for emails, organized exactly the same way

Is it allowed to create 2 escalations for the same host - one for emails notifications, another for phone calls - the difference are contacts and number of notifications issued?
my boss wants to have 3 phone calls and only one email per host for every escalation step.
Thank you
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: 2 escalations for the same host

Post by scottwilkerson »

Yes you can have multiple escalations for the same host, but there are some caveats if there becomes an overlap situation (which can be common)

Full details are laid out here
http://nagios.sourceforge.net/docs/3_0/escalations.html
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: 2 escalations for the same host

Post by vvz »

thank you
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: 2 escalations for the same host

Post by tmcdonald »

Let us know how this works out for you
Former Nagios employee
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: 2 escalations for the same host

Post by vvz »

Something wrong with my browser, you may already have these questions - if so, just drop this post

1) I have a few questions: if I have 2 escalations for the same host - first for sending emails, second - making phone calls ( different contacts for each), notification_interval - 3 for 1-st and -5 for second one. The smallest one (3) will be apllied for both, right?

2) if first escalation stops after notification #10, and second one after notification #20, general notification interval (before escalations) will be apllied, right? for the first only?

3) if I have contact belongs to 3 contactgroups and all of them active at the notification , how many emails will it get - 1 or 3?

4) if I disable macros in main config (enable_environment_macros=0), absolutely all macros will be disabled? I'm not able to use $CONTACTMAIL$ macros in commands.cfg?

Sorry for asking too many questions, but your help will save a great amount of time for me.

I should say Nagios is a great tool and I have a lot of fun to work with. Great job guys!!

Thank you
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: 2 escalations for the same host

Post by sreinhardt »

1) Only for overlapping escalation periods, will the smaller interval be used. Otherwise if they are separate such as notifications 1-3 then 4-9 they will not overlap and will use their own settings.
2) Yes until an escalation is met and applied, general intervals will apply
3) Honestly, I am not sure. I would hope only one, but that would require processing all contacts from groups, then sorting for unique contacts to send mail to. I am not sure if that is actually what happens or not.
4) No, that will only disable macros from being exported to the environment, so that nagios does not need to pass all important information via command macros. All standard macros that would be available via commands and such will still apply normally as those are expanded and processed within core and cannot be disabled(to my knowledge).
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.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: 2 escalations for the same host

Post by vvz »

thank you so much, you saved tonns of my time
Locked