Service dependencies are an advanced feature of Shinken that allow you to suppress notifications and active checks of services based on the status of one or more other services. Service dependencies are optional and are mainly targeted at advanced users who have complicated monitoring setups. More information on how service dependencies work (read this!) can be found here.
Bold directives are required, while the others are optional. However, you must supply at least one type of criteria for the definition to be of much use.
define servicedependency{ | |
dependent_host_name | *host_name* |
dependent_hostgroup_name | hostgroup_name |
dependent_service_description | *service_description* |
host_name | *host_name* |
hostgroup_name | hostgroup_name |
service_description | *service_description* |
inherits_parent | [0/1] |
execution_failure_criteria | [o,w,u,c,p,n] |
notification_failure_criteria | [o,w,u,c,p,n] |
dependency_period | timeperiod_name |
} |
define servicedependency{
host_name WWW1
service_description Apache Web Server
dependent_host_name WWW1
dependent_service_description Main Web Site
execution_failure_criteria n
notification_failure_criteria w,u,c
}
This directive is used to specify the criteria that determine when the dependent service should not be actively checked. If the master service is in one of the failure states we specify, the dependent service will not be actively checked. Valid options are a combination of one or more of the following (multiple options are separated with commas):
- o = fail on an OK state
- w = fail on a WARNING state
- u = fail on an UNKNOWN state
- c = fail on a CRITICAL state
- p = fail on a pending state (e.g. the service has not yet been checked).
- n (none) : the execution dependency will never fail and checks of the dependent service will always be actively checked (if other conditions allow for it to be).
If you specify o,c,u in this field, the dependent service will not be actively checked if the master service is in either an OK, a CRITICAL, or an UNKNOWN state.
This directive is used to define the criteria that determine when notifications for the dependent service should not be sent out. If the master service is in one of the failure states we specify, notifications for the dependent service will not be sent to contacts. Valid options are a combination of one or more of the following:
- o = fail on an OK state
- w = fail on a WARNING state
- u = fail on an UNKNOWN state
- c = fail on a CRITICAL state
- p = fail on a pending state (e.g. the service has not yet been checked).
- n = (none) : the notification dependency will never fail and notifications for the dependent service will always be sent out.
If you specify w in this field, the notifications for the dependent service will not be sent out if the master service is in a WARNING state.