how many stages of escalatios allowed?

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

how many stages of escalatios allowed?

Post by vvz »

Hello!
I'm testing escalations for test host and I have 2 escalation files for the same host( one for email, another for phone calls)
I 'll give you just a part of each, because escalations will circle a few times with the same contacts.

this one for emails - I need only one email for contact on each stage

Code: Select all

define hostescalation{
host_name               test-condor-site
hostgroup_name          condor-site,elsalto-site,concert-site
contact_groups          admins-onreserve
first_notification      2
last_notification       2
notification_interval   3
escalation_period       24x7
escalation_options      d
}

define hostescalation{
host_name               test-condor-site
hostgroup_name          condor-site,elsalto-site,concert-site
contact_groups          chile-technicians
first_notification      5
last_notification       5
notification_interval   3
escalation_period       24x7
escalation_options      d
}


define hostescalation{
host_name               test-condor-site
hostgroup_name          condor-site,elsalto-site,concert-site
contact_groups          chile-managers
first_notification      8
last_notification       8
notification_interval   3
escalation_period       24x7
escalation_options      d
}
define hostescalation{
host_name               test-condor-site
hostgroup_name          condor-site,elsalto-site,concert-site
contacts                lukasz
first_notification      11
last_notification       11
notification_interval   3
escalation_period       24x7
escalation_options      d
}

define hostescalation{
host_name               test-condor-site
hostgroup_name          condor-site,elsalto-site,concert-site
contacts                pat
first_notification      14
last_notification       14
notification_interval   3
escalation_period       24x7
escalation_options      d
}

###################################################################################
##### 2-nd iteration

this one for phone calls - 3 phone calls for each contact on every stage

Code: Select all

define hostescalation{
host_name               test-condor-site
hostgroup_name          condor-site,elsalto-site,concert-site
contact_groups          admins-onreserve-phone
first_notification      2
last_notification       4
notification_interval   3
escalation_period       24x7
escalation_options      d
}

define hostescalation{
host_name               test-condor-site
hostgroup_name          condor-site,elsalto-site,concert-site
contact_groups          chile-technicians-phone
first_notification      5
last_notification       7
notification_interval   3
escalation_period       24x7
escalation_options      d
}

define hostescalation{
host_name               test-condor-site
hostgroup_name          condor-site,elsalto-site,concert-site
contact_groups          chile-managers-phone
first_notification      8
last_notification       10
notification_interval   3
escalation_period       24x7
escalation_options      d
}
define hostescalation{
host_name               test-condor-site
hostgroup_name          condor-site,elsalto-site,concert-site
contacts                lukasz-phone
first_notification      11
last_notification       13
notification_interval   3
escalation_period       24x7
escalation_options      d
}

define hostescalation{
host_name               test-condor-site
hostgroup_name          condor-site,elsalto-site,concert-site
contacts                pat-phone
first_notification      14
last_notification       16
notification_interval   3
escalation_period       24x7
escalation_options      d
}

################################################################################
##### 2-nd iteration

This is my host file

Code: Select all

define host {
        host_name               test-condor-site
        alias                   test-condor-site
        address                 172.16.37.44
        check_command           check-host-alive
        max_check_attempts      5
        check_interval          3
        retry_interval          3
        active_checks_enabled   1
        check_period            24x7
        contact_groups          admins, admins-phone, first-call
        notification_interval   3
        notification_period     24x7
        notification_options    d
        notifications_enabled   1
        event_handler           asteriks-host-phone-call
        event_handler_enabled   1
        }



define service {
        host_name               test-condor-site
        service_description     check-host-alive-or-not
        check_command           check-host-alive
        max_check_attempts      5
        check_interval          3
        retry_interval          1
        active_checks_enabled   1
        check_period            24x7
        contacts                vassiliy,vassiliy-phone;mike,mike-phone
        #contact_groups          admins, admins-phone
        notification_interval   3
        notification_period     24x7
        notification_options    w,u,r,c
        notifications_enabled   0
        event_handler           asteriks-service-phone-call-vassiliy
        event_handler_enabled   0
        }


the problem is that up to chile-managers group in escalations everything is OK, each contact gets 3 calls and 1 email,
after chile managers escalation stage, contacts in host definition start to get notifications again.
Question is - only 3 stages of escalation allowed or something wrong with my configs? But they follow exactly the same logic as on early stages.
In my understanding untill escalation is finished, host contacts should not get any notifications. Am I right?
Thank you
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: how many stages of escalatios allowed?

Post by vvz »

I'm working only on host escalation now, don't pay attention to service definition in host file
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: how many stages of escalatios allowed?

Post by sreinhardt »

Out of the configs that you have shown, I do not see anything glaringly wrong with them. Also from my understanding you can do any number of escalations without issue, its just a matter of knowing what your configs are going to do. What is currently happening, that you do not expect to happen?
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: how many stages of escalatios allowed?

Post by vvz »

After notification #10 contacts in test-condor-site host definition get notification (they should not in my understanding of escalation).
That means contact lukasz gets notifications (which is right and according to escalation files) and contacts mike, mike-phone (belongs to groups admins, admins-phone) also get notifications (which is wrong, according escalation files).
So, in the middle of escalation procedure, contacts in host definition get notifications
that's the problem
Thank you
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: how many stages of escalatios allowed?

Post by vvz »

here you can see log file, explaining what I said

Code: Select all

May  6 15:36:42 callme-crt-billing nagios: HOST NOTIFICATION: jose;test-condor-site;DOWN;notify-host-by-email;PING CRITICAL - Packet loss = 100%
May  6 15:36:43 callme-crt-billing nagios: HOST NOTIFICATION: jose-phone;test-condor-site;DOWN;notify-host-by-phone;PING CRITICAL - Packet loss = 100%
May  6 15:39:53 callme-crt-billing nagios: HOST NOTIFICATION: jose-phone;test-condor-site;DOWN;notify-host-by-phone;PING CRITICAL - Packet loss = 100%
May  6 15:43:13 callme-crt-billing nagios: HOST NOTIFICATION: jose-phone;test-condor-site;DOWN;notify-host-by-phone;PING CRITICAL - Packet loss = 100%
May  6 15:46:33 callme-crt-billing nagios: HOST NOTIFICATION: mauricio;test-condor-site;DOWN;notify-host-by-email;PING CRITICAL - Packet loss = 100%
May  6 15:46:33 callme-crt-billing nagios: HOST NOTIFICATION: mauricio-phone;test-condor-site;DOWN;notify-host-by-phone;PING CRITICAL - Packet loss = 100%
May  6 15:49:43 callme-crt-billing nagios: HOST NOTIFICATION: mauricio-phone;test-condor-site;DOWN;notify-host-by-phone;PING CRITICAL - Packet loss = 100%
May  6 15:53:03 callme-crt-billing nagios: HOST NOTIFICATION: mauricio-phone;test-condor-site;DOWN;notify-host-by-phone;PING CRITICAL - Packet loss = 100%
May  6 15:56:23 callme-crt-billing nagios: HOST NOTIFICATION: lukasz;test-condor-site;DOWN;notify-host-by-email;PING CRITICAL - Packet loss = 100%
May  6 15:56:23 callme-crt-billing nagios: HOST NOTIFICATION: mike;test-condor-site;DOWN;notify-host-by-email;PING CRITICAL - Packet loss = 100%
May  6 15:56:23 callme-crt-billing nagios: HOST NOTIFICATION: mike-phone;test-condor-site;DOWN;notify-host-by-phone;PING CRITICAL - Packet loss = 100%
May  6 15:56:43 callme-crt-billing nagios: HOST NOTIFICATION: pat2;test-condor-site;DOWN;notify-host-by-email;PING CRITICAL - Packet loss = 100%
May  6 15:56:43 callme-crt-billing nagios: HOST NOTIFICATION: lukasz2;test-condor-site;DOWN;notify-host-by-email;PING CRITICAL - Packet loss = 100%
May  6 15:56:43 callme-crt-billing nagios: HOST NOTIFICATION: lukasz-phone;test-condor-site;DOWN;notify-host-by-phone;PING CRITICAL - Packet loss = 100%
after mauricio and mauricio-phone received calls (which is right and notifications #8-10, at notification #11 not only lukasz contact(escalations) got calls, but also mike,mike-phone,pat2,lukasz2 (all these 4 contacts come from host declaration))
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: how many stages of escalatios allowed?

Post by vvz »

I've solved the problem, thank you guys.
I've replaced indvidual contacts for lukasz and pat for contactgroups names (I've created for every contact it's own contactgroup) and it works now.
So the only question for me now (just for learning, because as I said everything works) is it possible to put in escalations mixture of contacts and contactgroups on every level of escalation .
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: how many stages of escalatios allowed?

Post by tmcdonald »

vvz wrote:is it possible to put in escalations mixture of contacts and contactgroups on every level of escalation .
That should work just fine:

http://nagios.sourceforge.net/docs/3_0/ ... escalation
Former Nagios employee
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: how many stages of escalatios allowed?

Post by vvz »

Thank you for your help
I have no questions for now
Locked