A very specific question on escalations:

Using Nagios 2.11:

I have a service definition with:
notification_interval 30
notification_period 24x7
notification_options c,r
contact_groups admin_pager_&_email

There’s also a set of escalation definitions in place which, starting on the 2nd notification, notifies progressively higher levels of managers.

In addition to what’s in place now, I need to find a way to send Warning notifications, but with the following limitations:

  1. Any changes or additions can’t interfere with the current notification scheme,
  2. The Warning notifications should only be sent to me, and only in email (via second contact & contact_group definitions), and
  3. Each Warning notification should only be sent once.

Would an escalation definition with the following options be allowable, and produce the desired effect?
escalation_options w
first_notification 1
last_notification 1
notification_interval 0
contact_groups admin_email_only

Two main things I’m not sure about are:

  1. Can you have an escalation for a Warning if a Warning isn’t included in the underlying service definition?
  2. Will the combination of “first_notification 1” and “notification_interval 0” might it have the unintended side effect of canceling out the existing Critical & Recovery escalations - or even the original notifications defined by the service escalation? (I’ve read the whole nagios.sourceforge.net/docs/3_0/escalations.html document, but I’m still not sure, and it’s a live server, so experimenting to see what will happen wouldn’t be my safest option.)

Would what I described work as is, need some minor modification, or is there a completely different way to do it (preferably without making a whole second set of service checks)?

Thanks for taking the time to read,
wn
:?:

Okay, this was my first post here. Did I do something wrong, or am I just not getting any replies because no one who’s read it knows the answer? :?:

Thanks!

[html]


Perhaps you're just a tiny bit impatient?

As evert said, you don’t have to be impatient. You have done nothing wrong. As you’ve said, it’s a very specific query you’re asking :wink: Nevermind, let’s get to business. NHF on either side, I hope

[blockquote]1. Can you have an escalation for a Warning if a Warning isn’t included in the underlying service definition?[/blockquote]
As far as I know, you can’t. But you can enable the notification for warning in your sevice definition, like this:

notification_interval 30 notification_period 24x7 notification_options w,c,r contact_groups admin_pager_&_email
[blockquote]2) The Warning notifications should only be sent to me, and only in email (via second contact & contact_group definitions), and[/blockquote]
Then break the current contact_group to admin_pager_group and admin_email_group, and add them both to contact_groups of your service definition. The difference would be in contact definitions:

define contact{ contact_name admin_email contactgroups admin_email_group host_notifications_enabled 1 service_notifications_enabled 1 host_notification_options d,u,r,f service_notification_options w,c,r email [email protected] }

define contact{ contact_name admin_pager contactgroups admin_pager_group host_notifications_enabled 1 service_notifications_enabled 1 host_notification_options d,u,r,f service_notification_options c,r pager admin_pager_address }
This way you defer the email contact and pager contact with the service_notification_options in which only admin_email contact gets notified with the warnings. This overrides service definition’s **contact_group ** and **notification_options **variables.

[blockquote]3) Each Warning notification should only be sent once[/blockquote]

define serviceescalation{ host_name host_name hostgroup_name hostgroup_name service_description service_description contacts admin_email first_notification 1 last_notification 1 notification_interval 0 escalation_period timeperiod_name escalation_options w }
With this you get notified only once for a warning to your email.
And this escalation doesn’t effect any of the Critical or Recovery notifications, because you’ve set escalation_options variable to w, which means, this escalation works only for warning states of the service set in service_description variable of the escalation definition. This way Critical and Recovery notifications would be sent as defined in service definition.
If you wan’t some similar escalation for Critical or Recovery, you then add new serviceescalation definitions to your configuration with the escalation_options set to c,r.

[blockquote]but I’m still not sure, and it’s a live server, so experimenting to see what will happen wouldn’t be my safest option[/blockquote]
This is the thing you should test first. It doesn’t really matter if it is a live server. Even better, you will emediately know if something is wrong in configuration. Use only your own contacts for testing purposes, and only you will get notifications. No one will even know you’re testing notifications if you use only your contact adresses in configuration definitions.

I hope I understood everything what you’ve meant, and replied to all your inquiries. If you need anything else, just post it, don’t get discouraged by waitng for a reply for a while.