Service escalations contact overwrites host contact group

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
kobazik
Posts: 5
Joined: Tue Feb 09, 2016 11:52 am

Service escalations contact overwrites host contact group

Post by kobazik »

Hi,

I'm trying to setup service escalations to go to Pagerduty using below configs. What actually happens is that alert notifications go to pagerduty contact only and not to Admins contact group defined for this host.


define contact {
contact_name pagerduty-infra
alias PagerDuty Infrastructure
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c,r
host_notification_options d,r
service_notification_commands notify-service-by-pagerduty
host_notification_commands notify-host-by-pagerduty
pager <token_goes_here>
}

define serviceescalation {
host_name srv1
service_description SSH
contacts pagerduty-infra
first_notification 1
last_notification 0
escalation_options c,r
}

define host {
address srv1
check_command check-host-alive
contact_groups Admins
host_name srv1
hostgroups Linux Servers
notifications_enabled 1
use generic-host,host-pnp
}



If I understand correctly service escalation should be sent to a contact in addition to what is defined in contact_groups in host level.

Is above configuration correct?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Service escalations contact overwrites host contact grou

Post by rkennedy »

I think there has been some confusion, as this is proper and how Nagios should be operating.
Nagios supports optional escalation of contact notifications for hosts and services. Escalation of host and service notifications is accomplished by defining host escalations and service escalations in your object configuration file(s). Once a notification is escalated, the contact/groups and notification options for the object will be overridden by the escalation's settings.
see this link - https://assets.nagios.com/downloads/nag ... tions.html

You can always add contact_groups Admins to your serviceescalation, this should provide the functionality you're looking for.
Former Nagios Employee
kobazik
Posts: 5
Joined: Tue Feb 09, 2016 11:52 am

Re: Service escalations contact overwrites host contact grou

Post by kobazik »

I just changed first_notification 1 to first_notification 2 . How could I miss this one before :)
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Service escalations contact overwrites host contact grou

Post by rkennedy »

Lots of documentation! :D Don't worry about it.

Are we good to mark this thread as resolved?
Former Nagios Employee
kobazik
Posts: 5
Joined: Tue Feb 09, 2016 11:52 am

Re: Service escalations contact overwrites host contact grou

Post by kobazik »

Sure. Please mark it is a resolved.
Locked