Hello,
I did a quick check through the forums and didn't see anything on this. I have a service check setup, which provides CRITICAL and WARNING alerts when a value hits the threshold. This works great. See example of the alert below. However, each time, I also get an alert on the host object and the alert for the host is always "Up" and "Ok" with the latest rta and % lost. Is there a way to have it only alert on the service and not the host? I feel like I am missing a setting here, but cannot find it.
Nagios has detected a problem with this service.
Type: PROBLEM
Service: Traffic
Host: Router
IP: 10.192.1.1
State: WARNING
Info: WARNING - Traffic Exceeds 75 Percent - 78
Respond: http://nagios/nagiosxi/rr.php?uid=63-71 ... a13322c199
Nagios URL: http://nagios/nagiosxi/
Date/Time: 2015-12-09 14:59:04
David
Double Alerts
Re: Double Alerts
You can always set up what type of notifications you would like to receive for this particular host under the CCM.
Host - notification options
This directive is used to determine when notifications for the host should be sent out. Valid options are a combination of one or more of the following:
d = send notifications on a DOWN state,
u = send notifications on an UNREACHABLE state,
r = send notifications on recoveries (OK state),
f = send notifications when the host starts and stops flapping, and
s = send notifications when scheduled downtime starts and ends.
If you do not specify any notification options, Nagios will assume that you want notifications to be sent out for all possible states.
Example: If you specify d,r in this field, notifications will only be sent out when the host goes DOWN and when it recovers from a DOWN state.
Parameter name: notification_options
Required: yes
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Double Alerts
Can you post the config for the service please.
CCM > Monitoring > Services
Click the floppy disk icon and paste the text config here please.
CCM > Monitoring > Services
Click the floppy disk icon and paste the text config here please.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Double Alerts
lmiltchev - thanks for your response. You provided host alert settings, but this is a service check. To rephrase my question, why am I receiving "host" alerts, when my "service" check reports a WARNING?
Box293 - Below is the config for the service, as well as the details for two nested templates being used with the service.
David
Box293 - Below is the config for the service, as well as the details for two nested templates being used with the service.
David
Code: Select all
###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.3.3
# Date: 2015-12-10 10:41:55
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define service {
host_name clsanfw01
service_description clsanfw01_InternetUtil_Entel4Mbps
use @clsan_net_master_template
display_name clsanfw01_InternetUtil_Entel4Mbps
servicegroups Latam_Bandwidth_Internet
check_command check_cisco_bw_util!Pern0dRO!4!15!!!!!
register 1
}
###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
Here are the associated templates for this service from the Service template configuration file... I omitted most services that were not used.
###############################################################################
#
# Service template configuration file
#
# Created by: Nagios Core Config Manager 2.3.3
# Date: 2015-12-10 10:44:12
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define service {
name @clsan_net_master_template
service_description Santiago CL Service Template
use @net_master_9x5
register 0
}
define service {
name @net_master_9x5
service_description Network_Master_9x5 for Services
initial_state o
max_check_attempts 3
check_interval 1
retry_interval 1
active_checks_enabled 1
passive_checks_enabled 1
check_period NET_Critical 24x7x365
notification_interval 1440
first_notification_delay 1
notification_period NET_Critical 24x7x365
notification_options w,c,u,r,s,
notifications_enabled 1
contact_groups NET_Alert_Group_9x5
register 0
}
Last edited by tmcdonald on Thu Dec 10, 2015 1:23 pm, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
Reason: Please use [code][/code] tags around long output
Re: Double Alerts
In your first post, you said:
and showed us the service notification. Can you also show us the actual host notification, along with the config of the contact, receiving it (& all associated commands, templates, etc.)? Thanks!However, each time, I also get an alert on the host object and the alert for the host is always "Up" and "Ok" with the latest rta and % lost.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Double Alerts
Below are the details of the host object (for this service), the host templates, contact group/contact and check command.
David
David
Code: Select all
###############################################################################
#
# Host configuration file
#
# Created by: Nagios Core Config Manager 2.3.3
# Date: 2015-12-10 13:03:25
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define host {
host_name clsanfw01
use @clsan_net_master_template
alias Santiago CL Firewall
address 192.168.0.1
parents clsanparent1
hostgroups clsan_network
icon_image snmp.png
statusmap_image snmp.png
_xiwizard snmp
register 1
}
###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################
[b]Template details...[/b] - non relevant templates were removed.
###############################################################################
#
# Host template configuration file
#
# Created by: Nagios Core Config Manager 2.3.3
# Date: 2015-12-10 13:05:06
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define host {
name @clsan_net_master_template
alias Santiago, CL Network Settings Template
use @network_master_9x5
initial_state o
register 0
}
define host {
name @network_master_9x5
alias network_master_9x5
check_command check-host-alive!!!!!!!!
initial_state o
max_check_attempts 3
check_interval 1
retry_interval 1
active_checks_enabled 1
passive_checks_enabled 1
check_period NET_Critical 24x7x365
contact_groups NET_Alert_Group_9x5
notification_interval 1440
notification_period NET_Critical 24x7x365
first_notification_delay 1
notification_options d,r,s,
notifications_enabled 1
register 0
}
[b]Contact Group and Contact Details[/b]
###############################################################################
#
# Contact Group configuration file
#
# Created by: Nagios Core Config Manager 2.3.3
# Date: 2015-12-10 13:12:08
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define contactgroup {
contactgroup_name NET_Alert_Group_9x5
alias NET_Alert_Group_9x5
members ddutt,ddutt_pager,jligot01,jwang01
}
###############################################################################
#
# Contact configuration file
#
# Created by: Nagios Core Config Manager 2.3.3
# Date: 2015-12-10 13:13:11
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define contact {
contact_name ddutt
alias David Dutt
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period NET_Critical 24x7x365
service_notification_period NET_Critical 24x7x365
host_notification_options d,u,r,f,s,
service_notification_options w,u,c,r,f,s,
host_notification_commands NET_xi_host_notification_handler
service_notification_commands NET_xi_host_notification_handler,xi_service_notification_handler
email [email protected]
pager 9146488046
use xi_contact_generic
}
###############################################################################
#
# Check command configuration file
#
# Created by: Nagios Core Config Manager 2.3.3
# Date: 2015-12-10 13:16:08
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define command {
command_name check_cisco_bw_util
command_line $USER1$/check_cisco_bw_util.sh $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$
Last edited by tmcdonald on Thu Dec 10, 2015 1:23 pm, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
Reason: Please use [code][/code] tags around long output
Re: Double Alerts
It seems like the "ddutt" contact is using both, the host & service notification handler defined for "service_notification_commands"...
define contact {
contact_name ddutt
alias David Dutt
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period NET_Critical 24x7x365
service_notification_period NET_Critical 24x7x365
host_notification_options d,u,r,f,s,
service_notification_options w,u,c,r,f,s,
host_notification_commands NET_xi_host_notification_handler
service_notification_commands NET_xi_host_notification_handler,xi_service_notification_handler
email [email protected]
pager 9146488046
use xi_contact_generic
}
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Double Alerts
I want to have users like ddutt to receive both host and service notifications. I am not seeing how this is related to the issue?
If there is a service check (for port or interface bandwidth utilization) that returns a WARNING, why should the host send an alert on this same service issue? My hosts are doing an ICMP or ping check, which is completely different and unrelated. Doesn't make sense to receive both service and host alerts, when only the service returns a WARNING and the host check is fine. For reference, here are the alerts received when bandwidth exceeds a threshold:
SERVICE ALERT
Nagios has detected this service has recovered.
Type: RECOVERY
Service: brresfw01_InternetUtil_Hotwave_4Mbps
Host: brresfw01
IP: 192.168.0.1
State: OK
Info: OK - Traffic Normal
Respond: http://nagios/nagiosxi/rr.php?uid=63-71 ... a13322c199
Nagios URL: http://nagios/nagiosxi/
Date/Time: 2015-12-10 14:00:29
HOST ALERT
Nagios has detected this host has recovered.
Notification Type: RECOVERY
Host: brresfw01
State: UP
Address: 192.168.0.1
Info: OK - 192.168.0.1: rta 148.518ms, lost 0%
Respond: http://nagios/nagiosxi/rr.php?uid=63-67 ... a13322c199
Nagios URL: http://nagios/nagiosxi/
Date/Time: 2015-12-10 14:00:29
David
If there is a service check (for port or interface bandwidth utilization) that returns a WARNING, why should the host send an alert on this same service issue? My hosts are doing an ICMP or ping check, which is completely different and unrelated. Doesn't make sense to receive both service and host alerts, when only the service returns a WARNING and the host check is fine. For reference, here are the alerts received when bandwidth exceeds a threshold:
SERVICE ALERT
Nagios has detected this service has recovered.
Type: RECOVERY
Service: brresfw01_InternetUtil_Hotwave_4Mbps
Host: brresfw01
IP: 192.168.0.1
State: OK
Info: OK - Traffic Normal
Respond: http://nagios/nagiosxi/rr.php?uid=63-71 ... a13322c199
Nagios URL: http://nagios/nagiosxi/
Date/Time: 2015-12-10 14:00:29
HOST ALERT
Nagios has detected this host has recovered.
Notification Type: RECOVERY
Host: brresfw01
State: UP
Address: 192.168.0.1
Info: OK - 192.168.0.1: rta 148.518ms, lost 0%
Respond: http://nagios/nagiosxi/rr.php?uid=63-67 ... a13322c199
Nagios URL: http://nagios/nagiosxi/
Date/Time: 2015-12-10 14:00:29
David
Re: Double Alerts
Nevermind. I didn't see that I had both Host and Service handlers on the service notification configuration. I thought you were pointing out something else.
Thanks for your help. Please close the issue.
Thanks for your help. Please close the issue.