When Are Host Checks Performed?
Hosts are checked by the Yoopl cron:
- At regular intervals, as defined by the
retry_intervaloptions in your host definitions.
- On-demand when a service associated with the host changes state.
- On-demand as needed as part of the host reachability logic.
- On-demand as needed for predictive host dependency checks.
Regularly scheduled host checks are optional. If you set the
check_interval option in your host definition to zero (0), Yoopl will not perform checks of the hosts on a regular basis. It will, however, still perform on-demand checks of the host as needed for other parts of the monitoring logic.
On-demand checks are made when a service associated with the host changes state because Yoopl needs to know whether the host has also changed state. Services that change state are often an indicator that the host may have also changed state.
For example, if Yoopl detects that the HTTP service associated with a host just changed from a CRITICAL to an OK state, it may indicate that the host just recovered from a reboot and is now back up and running.
On-demand checks of hosts are also made as part of the host reachability logic. Yoopl is designed to detect network outages as quickly as possible, and distinguish between DOWN and UNREACHABLE host states. These are very different states and can help an admin quickly locate the cause of a network outage.
On-demand checks are also performed as part of the predictive host dependency check logic. These checks help ensure that the dependency logic is as accurate as possible.
Hosts that are checked can be in one of three different states:
Host State Determination
Host checks are performed by checkcommands, which can return a state of OK, WARNING, UNKNOWN, or CRITICAL. How does Yoopl translate these return codes into host states of UP, DOWN, or UNREACHABLE? Lets see in the table below.
|Plugin Result||Preliminary Host State|
|WARNING||UP or DOWN*|
Note: WARNING results usually means the host is UP. However, WARNING results are interpreted to mean the host is DOWN if the
use_aggressive_host_checkingoption is enabled.
If the preliminary host state is DOWN, Yoopl will attempt to see if the host is really DOWN or if it is UNREACHABLE. The distinction between DOWN and UNREACHABLE host states is important, as it allows admins to determine root cause of network outages faster. The following table shows how Yoopl makes a final state determination based on the state of the hosts parent(s). A host's parents are defined in the parents directive in host definition.
|Preliminary Host State||Parent Host State||Final Host State|
|DOWN||At least one parent is UP||DOWN|
|DOWN||All parents are either DOWN or UNREACHABLE||UNREACHABLE|
More information on how Yoopl distinguishes between DOWN and UNREACHABLE states can be found here.
Host State Changes
As you are probably well aware, hosts don't always stay in one state. Things break, patches get applied, and servers need to be rebooted. When Yoopl checks the status of hosts, it will be able to detect when a host changes between UP, DOWN, and UNREACHABLE states and take appropriate action. These state changes result in different state types (HARD or SOFT), which can trigger event handlers to be run and notifications to be sent out.
When hosts change state too frequently they are considered to be "flapping". A good example of a flapping host would be server that keeps spontaneously rebooting as soon as the operating system loads. Yoopl can detect when hosts start flapping, and can suppress notifications until flapping stops and the host's state stabilizes. More information on the flap detection logic can be found here.