Issue sending alerts to All contacts within a Contact Groups

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
heritages
Posts: 58
Joined: Thu Jan 16, 2014 11:55 am

Re: Issue sending alerts to All contacts within a Contact Gr

Post by heritages »

This is what I find...

define contactgroup {
contactgroup_name IT Infrastructure 24-7 Email SMS
alias Ariva IT Infr. 24-7 Email &amp
members cadranelsms,heritagesms,heritages,cadranelm
}

Noticed that the Alias is wrong as it was supposed to be Ariva IT Infr. 24-7 Email & SMS
Removed the & symbol
Saved and now it looks like below.

define contactgroup {
contactgroup_name IT Infrastructure 24-7 Email SMS
alias Ariva IT Infr. 24-7 Email SMS
members cadranelsms,heritagesms,heritages,cadranelm
}

Reconfigured this Contact Group for a host
Shutdown host
Received Text only for HOST is DOWN
Powered on host
Received Text and Email that HOST has recovered.

Not sure why I only get the text when it went down.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Issue sending alerts to All contacts within a Contact Gr

Post by tmcdonald »

This depends on a lot of things. Two of them:

What the individual host/service is set to alert on
What each individual contact is set to receive alerts for

Can you post some configs for those host/services and contacts that are not receiving alerts as you think they should be?
Former Nagios employee
heritages
Posts: 58
Joined: Thu Jan 16, 2014 11:55 am

Re: Issue sending alerts to All contacts within a Contact Gr

Post by heritages »

I think this is what you are looking for...

Code: Select all

###############################################################################
#
# Host configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date:	      2014-03-13 09:38:00
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND --- 
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################

define host {
	host_name			Mis1MsBb01
	use				xiwizard_windowsserver_host
	address				172.16.124.117
	hostgroups			Host - Mis1 - Server - Win
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	contact_groups			IT Infrastructure 24-7 Email SMS
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	first_notification_delay	0
	notification_options		d,u,r,f,s
	notifications_enabled		1
	icon_image			win_server.png
	statusmap_image			win_server.png
	_xiwizard			windowsserver
	register			1
	}	

###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################

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

Re: Issue sending alerts to All contacts within a Contact Gr

Post by tmcdonald »

That's certainly part of what I need. But as this is a contacts issue I mentioned that we'll need to look at one of the contacts associated with the host. See if you can get a config from someone in the "IT Infrastructure 24-7 Email SMS" group. Bear in mind that the individual contacts in that group have their own settings, so if one contact is getting alerts correctly it does not mean all the others will.
Former Nagios employee
heritages
Posts: 58
Joined: Thu Jan 16, 2014 11:55 am

Re: Issue sending alerts to All contacts within a Contact Gr

Post by heritages »

Here you go. These are the two contacts associated to me. The first isn't getting the alert when the server is shutdown, the second is getting the alert. Both are getting notified when the server comes back online.

Code: Select all

define contact {
	contact_name                  		heritages
	alias                         		Steven Heritage
	contactgroups                 		IT Infrastructure 24-7 Email,IT Infrastructure 24-7 Email SMS
	host_notifications_enabled    		1
	service_notifications_enabled 		1
	host_notification_period      		xi_timeperiod_24x7
	service_notification_period   		xi_timeperiod_24x7
	host_notification_options     		d,u,r,f,s,
	service_notification_options  		w,u,c,r,f,s,
	host_notification_commands    		xi_host_notification_handler
	service_notification_commands 		xi_service_notification_handler
	email                         		<removed for forum>
	pager                         		<removed for forum>
	host_notifications_enabled    		1
	service_notifications_enabled 		1
	use                           		xi_contact_generic
	}	

define contact {
	contact_name                  		heritagesms
	alias                         		Heritage SMS Alerts
	host_notification_period      		xi_timeperiod_24x7
	service_notification_period   		xi_timeperiod_24x7
	host_notification_options     		d,u,r,f,s,
	service_notification_options  		w,u,c,r,f,s,
	host_notification_commands    		xi_host_notification_handler
	service_notification_commands 		xi_service_notification_handler
	email                         		<removed for forum>
	host_notifications_enabled    		1
	service_notifications_enabled 		1
	use                           		xi_contact_generic
	}	
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Issue sending alerts to All contacts within a Contact Gr

Post by lmiltchev »

Hm-m, "heritages" *should* be receiving alerts on "Host Down"...

Go to Home->Host Detail, and click on a host that "heritages" has been assigned to as a monitoring contact. Go to the "Advanced" tab, click on "Submit passive check result"->

Check Result: DOWN
Check Result: Type something

and click on "Commit".

Note: You may need to change temporarily the "Max check attempts" to 1, so that the host will change state (hard DOWN) after submitting the first passive check result (or send a several passive check results in a raw)

Check to see if the "heritages" contact received a notification.

Go to: Home->Notifications->type "heritages" in the "Search" bar, hit "Enter", and show us a screenshot of this page.
Be sure to check out our Knowledgebase for helpful articles and solutions!
heritages
Posts: 58
Joined: Thu Jan 16, 2014 11:55 am

Re: Issue sending alerts to All contacts within a Contact Gr

Post by heritages »

Here is the output of the notification Log.
I've attached a screen shot also.

2014-03-17 09:23:13 Mis1MsBb01 - Host Recovery No UP heritages Nagios XI OK - 172.16.124.117: rta 2.130ms, lost 0% NID: 3567, COID: 139, CNID: 1969, CNMID: 1969
2014-03-17 09:23:13 Mis1MsBb01 - Host Recovery No UP cadranelm Nagios XI OK - 172.16.124.117: rta 2.130ms, lost 0% NID: 3567, COID: 149, CNID: 1970, CNMID: 1970
2014-03-17 09:23:13 Mis1MsBb01 - Host Recovery No UP cadranelsms Nagios XI OK - 172.16.124.117: rta 2.130ms, lost 0% NID: 3567, COID: 831, CNID: 1967, CNMID: 1967
2014-03-17 09:23:13 Mis1MsBb01 - Host Recovery No UP heritagesms Nagios XI OK - 172.16.124.117: rta 2.130ms, lost 0% NID: 3567, COID: 827, CNID: 1968, CNMID: 1968
2014-03-17 09:22:43 Mis1MsBb01 - Host Problem Yes DOWN heritagesms Nagios XI test NID: 3566, COID: 827, CNID: 1965, CNMID: 1965
2014-03-17 09:22:43 Mis1MsBb01 - Host Problem Yes DOWN cadranelsms Nagios XI test NID: 3566, COID: 831, CNID: 1966, CNMID: 1966
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issue sending alerts to All contacts within a Contact Gr

Post by scottwilkerson »

Ok, this looks like you have an escalation setup for this host. Can you show the escalation configuration for this host?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
heritages
Posts: 58
Joined: Thu Jan 16, 2014 11:55 am

Re: Issue sending alerts to All contacts within a Contact Gr

Post by heritages »

You've earned your pay cheque today and its not even 8 AM yet. That was the issue. I must have played around with Host Escalation when first installing XI and forgot to disable it. Now the next question... What is Host Escalation and when should I use it? Can you point me towards any documentation on this? Also is there a flow chart of how a notifications are handled? Something that shows how the various components of Nagios XI comes into play when an event occurs?

Thanks again.

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

Re: Issue sending alerts to All contacts within a Contact Gr

Post by sreinhardt »

Probably the best guide on escalations is the official documentation. Escalation in short, is a way to control when and where notifications are sent with more granularity than just contacts(groups) and intervals. It allows setting max notifications sent, rerouting of notifications at or after a certain amount sent, and other such things. It can be extremely powerful when used properly or trip you up if you forget its on. :)
Also is there a flow chart of how a notifications are handled? Something that shows how the various components of Nagios XI comes into play when an event occurs?
Boy that would be awesome, but at this point I know of no such thing.
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.
Locked