Hi there !
I have some services and want to make some dependencies between them to reduce number of alarms recieved by e-mail, but i dont receive any alarms… I read docs, forums, but no result. Maybe i dont understand smthng…
I have a main server “bigserver” and services : Ping,Telnet,Progress TCP broker on them and windows server “winserver” whith share “winshare” on them. I want to not receive notifications from all services when bigserver Ping service is not ok.
For example if service “winshare share” is in critical state, I dont receive any alarms by mail, but have SERVICE ALERT in log :
SERVICE ALERT: winserver;winshare share;CRITICAL;HARD;1;CRITICAL: Only 4.09G (2%) free on //winserver/winshare
Without servicedependency all notifications work (i receive e-mail).
So, my config:
FreeBSD 6.2, nagios-2.9_1 installed from ports,
Important strings in config :
###############################################################################
#
# CONTACTS
#
###############################################################################
define contact{
contact_name nagios-admin
alias Nagios Admin
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email nagios-admin@localhost
}
#################################################
#
# SERVICES
#
#################################################
define service{
use generic-service ; Name of service template to use
host_name *
service_description Ping
check_period 24x7
max_check_attempts 4
normal_check_interval 5
retry_check_interval 1
contact_groups admins
notification_options w,u,c,r
notification_interval 60 ; Notify every 60 minutes
notification_period 24x7
check_command check-ping!100.0,20%!500.0,60%
}
define service{
use generic-service ; Name of service template to use
host_name bigserver
service_description Telnet
check_period 24x7
max_check_attempts 1
normal_check_interval 1
retry_check_interval 1
contact_groups admins
notification_options w,u,c,r
notification_interval 1 ; Notify every 60 minutes
notification_period 24x7
check_command check-tcp!23
}
define service{
use generic-service ; Name of service template to use
host_name bigserver
service_description Progress TCP broker
check_period 24x7
max_check_attempts 1
normal_check_interval 1
retry_check_interval 1
contact_groups admins
notification_options w,u,c,r
notification_interval 1 ; Notify every 60 minutes
notification_period 24x7
check_command check-tcp!30000
}
define service{
use generic-service ; Name of service template to use
host_name winserver
service_description winshare share
check_period 24x7
max_check_attempts 1
normal_check_interval 1
retry_check_interval 1
contact_groups admins
notification_options w,u,c,r
notification_interval 1 ; Notify every 60 minutes
notification_period 24x7
check_command check-disk-smb!winshare!90!95
}
################################################################################
# SERVICE DEPENDENCY DEFINITIONS
################################################################################
# GLOBAL SERVICE DEPENDENCY - all services depend on root switches Ping service#
define servicedependency{
hostgroup_name rootswitches
service_description Ping
dependent_hostgroup_name servers,switches
dependent_service_description *
inherits_parent 1
execution_failure_criteria w,u,c
notification_failure_criteria w,u,c
}
###################### Dependencies for bankier suite ###########################
define servicedependency{
host_name bigserver
service_description Ping
dependent_host_name bigserver
dependent_service_description Telnet,Progress TCP broker
inherits_parent 1
execution_failure_criteria n
notification_failure_criteria w,u,c
}
define servicedependency{
host_name bigserver
service_description Ping
dependent_host_name winserver
dependent_service_description winshare share
inherits_parent 1
execution_failure_criteria n
notification_failure_criteria w,u,c
}
So, how to not receive notifications from all services when bigserver Ping service is not ok ?