下面的这些参数的含义是我根据nagios的官方文档 https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/objectdefinitions.html 中我用到的部分总结的。
object | options | |
host | flap_detection_options | o = UP, |
d = DOWN, | ||
and u = UNREACHABLE. | ||
notification_options | 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 stopsflapping, | ||
and s = send notifications when scheduled downtime starts and ends. | ||
If you specify n (none) as an option, no host notifications will be sent out. | ||
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 | ||
stalking_options | o = stalk on UP states, | |
d = stalk on DOWN states, | ||
and u = stalk on UNREACHABLE states | ||
service | initial_state | o = OK, |
w = WARNING, | ||
u = UNKNOWN, | ||
and c = CRITICAL. | ||
flap_detection_options | o = OK states, | |
w = WARNING states, | ||
c = CRITICAL states, | ||
u = UNKNOWN states | ||
notification_options | w = send notifications on a WARNING state, | |
u = send notifications on an UNKNOWN state, | ||
c = send notifications on a CRITICAL state, | ||
r = send notifications on recoveries (OK state), | ||
f = send notifications when the service starts and stops flapping, | ||
and s = send notifications when scheduled downtime starts and ends. | ||
If you specify n (none) as an option, no service notifications will be sent out. | ||
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 w,r in this field, | ||
notifications will only be sent out when the service goes into a WARNING state and when it recovers from a WARNING state. | ||
stalking_options | o = stalk on OK states, | |
w = stalk on WARNING states, | ||
u = stalk on UNKNOWN states, | ||
and c = stalk on CRITICAL states | ||
servicedependency | notification_failure_criteria | o = fail on an OK state, |
w = fail on a WARNING state, | ||
u = fail on an UNKNOWN state, | ||
c = fail on a CRITICAL state, | ||
and p = fail on a pending state (e.g. the service has not yet been checked). | ||
If you specify n (none) as an option, the notification dependency will never fail and notifications for the dependent service will always be sent out. | ||
Example: 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. |