This documentation will introduce how to use
health policy to apply periodical
health checking to an application.
After an application is deployed, users usually want to monitor or observe the health condition of the running application as well as each components. Health policy decouples health checking procedure from application workflow execution. It allows to set independent health inspection cycle, such as check every 30s. That helps users to notice as soon as applications turn out unhealthy and follow the diagnosis message to troubleshot.
We apply the sample application including two components,
supposed to be healthy while
my-server-unhealthy is supposed to be unhealthy
(because of invalid image).
As shown in the sample, a
Health policy is specified.
Health policy accepts two optional properties,
probeInterval indicating time
duration between checking (default is 30s) and
probeTimeout indicating time
duration before checking timeout (default is 10s).
To learn about defining health checking rules, please refer to Status Write Back.
Finally we can observe application health status from its
Here is a snippet of health status.
|probeInterval||time duration between checking (in units of seconds)||int||false||30|
|probeTimeout||time duration before checking timeout (in units of seconds)||int||false||10|