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

Unexpected Notification Behavior

Post by jamesc23 »

Thanks very much for this.

More question....

The way our notification is setup is not quite right and I want to fix it. We have SMS and email notifications setup. Currently, all hosts and all services have notifications assigned to them. Hosts are assigned with both SMS and email notifications. Some services are assigned the same and some are assigned with email notifications only.

I've just created a service with email notification enabled only. When I assign this service to a host group which contains all hosts, I get both SMS and email notifications when it hits the threshold. It seems like this service is inheriting the notification from the host. I don't want this to happen as this service doesn't need SMS notification.

How do I get around this with? I know that disable all notifications from the hosts individually might do the trick, but I don't think I can go through 300+ servers to do this.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Standardise our services

Post by Box293 »

Can you please post your service definition. In CCM click the disk icon and this will display a text config.
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: Standardise our services

Post by jamesc23 »

Hi,

I don't see the disk icon within the main CCM section, but I've found the core main config. Not sure if it's the same.

Code: Select all

# MODIFIED
admin_email=root@localhost
admin_pager=root@localhost
translate_passive_host_checks=1
log_event_handlers=0
use_large_installation_tweaks=1
enable_environment_macros=0


# NDOUtils module
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg


# PNP settings - bulk mode with NCPD
process_performance_data=1
# service performance data
service_perfdata_file=/usr/local/nagios/var/service-perfdata
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$\tSERVICEOUTPUT::$SERVICEOUTPUT$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=process-service-perfdata-file-bulk
# host performance data
host_perfdata_file=/usr/local/nagios/var/host-perfdata
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tHOSTOUTPUT::$HOSTOUTPUT$
host_perfdata_file_mode=a
host_perfdata_file_processing_interval=15
host_perfdata_file_processing_command=process-host-perfdata-file-bulk


# OBJECTS - UNMODIFIED
#cfg_file=/usr/local/nagios/etc/objects/commands.cfg
#cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
#cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
#cfg_file=/usr/local/nagios/etc/objects/templates.cfg
#cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg


# STATIC OBJECT DEFINITIONS (THESE DON'T GET EXPORTED/IMPORTED BY NAGIOSQL)
cfg_dir=/usr/local/nagios/etc/static

# OBJECTS EXPORTED FROM NAGIOSQL
cfg_file=/usr/local/nagios/etc/contacttemplates.cfg
cfg_file=/usr/local/nagios/etc/contactgroups.cfg
cfg_file=/usr/local/nagios/etc/contacts.cfg
cfg_file=/usr/local/nagios/etc/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/commands.cfg
cfg_file=/usr/local/nagios/etc/hostgroups.cfg
cfg_file=/usr/local/nagios/etc/servicegroups.cfg
cfg_file=/usr/local/nagios/etc/hosttemplates.cfg
cfg_file=/usr/local/nagios/etc/servicetemplates.cfg
cfg_file=/usr/local/nagios/etc/servicedependencies.cfg
cfg_file=/usr/local/nagios/etc/serviceescalations.cfg
cfg_file=/usr/local/nagios/etc/hostdependencies.cfg
cfg_file=/usr/local/nagios/etc/hostescalations.cfg
cfg_file=/usr/local/nagios/etc/hostextinfo.cfg
cfg_file=/usr/local/nagios/etc/serviceextinfo.cfg
cfg_dir=/usr/local/nagios/etc/hosts
cfg_dir=/usr/local/nagios/etc/services

# GLOBAL EVENT HANDLERS
global_host_event_handler=xi_host_event_handler
global_service_event_handler=xi_service_event_handler



# UNMODIFIED
accept_passive_host_checks=1
accept_passive_service_checks=1
additional_freshness_latency=15
auto_reschedule_checks=0
auto_rescheduling_interval=30
auto_rescheduling_window=180
bare_update_check=0
cached_host_check_horizon=15
cached_service_check_horizon=15
check_external_commands=1
check_for_orphaned_hosts=1
check_for_orphaned_services=1
check_for_updates=1
check_host_freshness=0
check_result_path=/usr/local/nagios/var/spool/checkresults
check_result_reaper_frequency=10
check_service_freshness=1
command_check_interval=-1
command_file=/usr/local/nagios/var/rw/nagios.cmd
daemon_dumps_core=0
date_format=us
debug_file=/usr/local/nagios/var/nagios.debug
debug_level=0
debug_verbosity=1
enable_embedded_perl=1
enable_event_handlers=1
enable_flap_detection=1
enable_notifications=1
enable_predictive_host_dependency_checks=1
enable_predictive_service_dependency_checks=1
event_broker_options=-1
event_handler_timeout=30
execute_host_checks=1
execute_service_checks=1
external_command_buffer_slots=4096
high_host_flap_threshold=20.0
high_service_flap_threshold=20.0
host_check_timeout=30
host_freshness_check_interval=60
host_inter_check_delay_method=s
illegal_macro_output_chars=`~$&|'"<>
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
interval_length=60
lock_file=/usr/local/nagios/var/nagios.lock
log_archive_path=/usr/local/nagios/var/archives
log_external_commands=0
log_file=/usr/local/nagios/var/nagios.log
log_host_retries=1
log_initial_states=0
log_notifications=1
log_passive_checks=0
log_rotation_method=d
log_service_retries=1
low_host_flap_threshold=5.0
low_service_flap_threshold=5.0
max_check_result_file_age=3600
max_check_result_reaper_time=30
max_concurrent_checks=0
max_debug_file_size=1000000
max_host_check_spread=30
max_service_check_spread=30
nagios_group=nagios
nagios_user=nagios
notification_timeout=30
object_cache_file=/usr/local/nagios/var/objects.cache
obsess_over_hosts=0
obsess_over_services=0
ocsp_timeout=5
p1_file=/usr/local/nagios/bin/p1.pl
passive_host_checks_are_soft=0
perfdata_timeout=5
precached_object_file=/usr/local/nagios/var/objects.precache
resource_file=/usr/local/nagios/etc/resource.cfg
retained_contact_host_attribute_mask=0
retained_contact_service_attribute_mask=0
retained_host_attribute_mask=0
retained_process_host_attribute_mask=0
retained_process_service_attribute_mask=0
retained_service_attribute_mask=0
retain_state_information=1
retention_update_interval=60
service_check_timeout=60
service_freshness_check_interval=60
service_inter_check_delay_method=s
service_interleave_factor=s
sleep_time=0.25
soft_state_dependencies=0
state_retention_file=/usr/local/nagios/var/retention.dat
status_file=/usr/local/nagios/var/status.dat
status_update_interval=10
temp_file=/usr/local/nagios/var/nagios.tmp
temp_path=/tmp
use_aggressive_host_checking=0
use_embedded_perl_implicitly=1
use_regexp_matching=0
use_retained_program_state=1
use_retained_scheduling_info=1
use_syslog=1
use_true_regexp_matching=0
Last edited by tmcdonald on Mon Aug 31, 2015 9:20 am, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Unexpected Notification Behavior

Post by jdalrymple »

You posted the main nagios.cfg. It is not useful for troubleshooting this problem. See attachment for the disk icon Box293 was referring to.
You do not have the required permissions to view the files attached to this post.
jamesc23
Posts: 82
Joined: Thu Jan 15, 2015 11:55 pm

Re: Unexpected Notification Behavior

Post by jamesc23 »

Sorry. Here it is.

###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2015-09-08 09:43:26
# 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 service {
service_description Uptime Report of more than 450 days
use xiwizard_nrpe_service
hostgroup_name Uptime Report
check_command check_uptime!!!!!!!!
max_check_attempts 5
check_interval 1440
retry_interval 1
check_period 24x7
notification_interval 1440
notification_period 24x7
notification_options w,c
notifications_enabled 1
contacts n_testuser
register 1
}

###############################################################################
#
# Service 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 »

Can I get you to clarify a few things please?
jamesc23 wrote:We have SMS and email notifications setup. Currently, all hosts and all services have notifications assigned to them. Hosts are assigned with both SMS and email notifications. Some services are assigned the same and some are assigned with email notifications only.
Do you have:
  • a) Each user has mail and SMS notifications defined in their preferences via clicking their username in the top right corner (one contact object for the user)
    b) Each user has a user account for mail notifications and another user account for SMS notifications (two contact objects per user)
jamesc23 wrote: Currently, all hosts and all services have notifications assigned to them.
Are you assigning the contacts specifically on each host, or using contact groups?
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 »

jamesc23 wrote:Do you have:
a) Each user has mail and SMS notifications defined in their preferences via clicking their username in the top right corner (one contact object for the user)
b) Each user has a user account for mail notifications and another user account for SMS notifications (two contact objects per user)
We have option B
jamesc23 wrote:Are you assigning the contacts specifically on each host, or using contact groups?
We currently have contacts assigned to each host. This was setup before my time. What I'm trying to do here is the assign contacts to this service only. I'm presuming that I would have to unassign the contacts from each host, then assign contacts to each service that belong to a host?

Many thanks.
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:What I'm trying to do here is the assign contacts to this service only. I'm presuming that I would have to unassign the contacts from each host, then assign contacts to each service that belong to a host?
No it's much easier than that.
Edit the service in CCM
Alert Settings tab
Click the button Manage Contacts
At the bottom under Contact Options select the "standard" radio
Click Close
Save.

I believe this should stop the inheritance.
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 »

The setting is already on standard. When I enabled this service a few weeks ago I was getting SMS alerts.

Could the setting be null?
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 »

box293 wrote:Do you have:
a) Each user has mail and SMS notifications defined in their preferences via clicking their username in the top right corner (one contact object for the user)
b) Each user has a user account for mail notifications and another user account for SMS notifications (two contact objects per user)
jamesc23 wrote:We have option B
Can you go to Admin > Users
Provide a screenshot of the user account for mail notifications and the user account for SMS notifications.

Then go to CCM > Alerting > Contacts
Click the disk icon and paste the two contact definitions here.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked