Unexpected Notification Behavior

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jamesc23
Posts: 82
Joined: Thu Jan 15, 2015 11:55 pm

Re: Unexpected Notification Behavior

Post by jamesc23 »

Assuming you wanted to see one of the hosts config file, and not the actual Nagios server.

###############################################################################
#
# Host configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2015-09-09 11:24:10
# 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 SYD01SQL09
use xiwizard_windowsserver_host
address 10.81.174.159
hostgroups SQL-Servers,SYD01
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
contact_groups L3_EAlert_Group,L3_SMSAlert_Group
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
#
###############################################################################
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Unexpected Notification Behavior

Post by Box293 »

So I believe the issue is this in the hosts config file:

contact_groups L3_EAlert_Group,L3_SMSAlert_Group

The contact group defined on the host object is being inherited through to the service.

Try this:
Create a Contact Group called "No Contacts" with no contacts assigned to it
Save it and Apply Config
Go to the service
Alert Settings tab
Click Manage Contactgroups button
Add the "No Contacts" group to the right and make sure "standard" is selected
Close
Save
Apply Config

Does this fix your problem?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jamesc23
Posts: 82
Joined: Thu Jan 15, 2015 11:55 pm

Re: Unexpected Notification Behavior

Post by jamesc23 »

Just to clarify this. By assigning the service to a no contact group with standard selected, would this mean that the service will inherit the host notifications?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Unexpected Notification Behavior

Post by Box293 »

It means the service will NOT inherit the contactgroup from the host object. The contacts directive on the host and service are independent of the contactgroup directive.

Additive means combine the host and service object, null means do nothing and standard does not inherit.

When standard is selected but there are no contactgroup objects assigned it would inherit the host object, because the service definition does not end up with a contact group directive.

You could try setting the contactgroup option to null on the service as well (without selecting any contactgroup). I think that would do the same thing as selecting an empty contactgroup.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jamesc23
Posts: 82
Joined: Thu Jan 15, 2015 11:55 pm

Re: Unexpected Notification Behavior

Post by jamesc23 »

I see. Thanks for this.

I've done just that but now I'm not seeing any alerts for this service. If this service is now not inheriting from host group, but has no contacts assigned to it. Wouldn't this mean that there will be no notifications sent as there is no recipient?

I originally thought that assigning a contact or contact group to a service, and set the contact or contact group to NULL, the service would not inherit host group and will use its own notification settings.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Unexpected Notification Behavior

Post by Box293 »

jamesc23 wrote:I've done just that but now I'm not seeing any alerts for this service. If this service is now not inheriting from host group, but has no contacts assigned to it. Wouldn't this mean that there will be no notifications sent as there is no recipient?
If the service does not have any contacts assigned and the contactgroups for the service is set to null then it would still inherit contacts from the host object, just not contactgroups. However if the host object has no contacts then you will receive no notifications.
jamesc23 wrote:I originally thought that assigning a contact or contact group to a service, and set the contact or contact group to NULL, the service would not inherit host group and will use its own notification settings.
I believe null means "use none" (separate setting for contacts and contactgroups) and whatever contacts or contactgroups you assigned will be ignored.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jamesc23
Posts: 82
Joined: Thu Jan 15, 2015 11:55 pm

Re: Unexpected Notification Behavior

Post by jamesc23 »

I see. I think I misunderstood the whole concept a bit.

Originally, I had a contact assigned to this service only, and not a contact group. I've just tried to add a test contact to a test contact group and assign the test contact group to this service and it seems like it's working.

I will keep an eye on this for the next few days to see how it's going.

Thanks for your help.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Unexpected Notification Behavior

Post by hsmith »

jamesc23 wrote:I see. I think I misunderstood the whole concept a bit.

Originally, I had a contact assigned to this service only, and not a contact group. I've just tried to add a test contact to a test contact group and assign the test contact group to this service and it seems like it's working.

I will keep an eye on this for the next few days to see how it's going.

Thanks for your help.
Sounds good! Let us know if you need any more help.
Former Nagios Employee.
me.
Locked