diff --git a/docs/index.html b/docs/index.html index 2da81ba1..52451055 100644 --- a/docs/index.html +++ b/docs/index.html @@ -27,6 +27,7 @@
resty.healthcheck
Healthcheck library for OpenResty.
-- - -
Some notes on the usage of this library:
+Some notes on the usage of this library:
Each target will have 4 counters, 1 success counter and 3 failure - counters ('http', 'tcp', and 'timeout'). Any failure will only reset the - success counter, but a success will reset all three failure counters.
All targets are uniquely identified by their IP address and port number - combination, most functions take those as arguments.
All keys in the SHM will be namespaced by the healthchecker name as
- provided to the new function. Hence no collissions will occur on shm-keys
- as long as the name
is unique.
Active healthchecks will be synchronized across workers, such that only - a single active healthcheck runs.
Events will be raised in every worker, see lua-resty-worker-events - for details.
Each target will have 4 counters, 1 success counter and 3 failure +counters (‘http’, ‘tcp’, and ‘timeout’). Any failure will only reset the +success counter, but a success will reset all three failure counters.
All targets are uniquely identified by their IP address and port number +combination, most functions take those as arguments.
All keys in the SHM will be namespaced by the healthchecker name as
+provided to the new function. Hence no collissions will occur on shm-keys
+as long as the name
is unique.
Active healthchecks will be synchronized across workers, such that only +a single active healthcheck runs.
Events will be raised in every worker, see lua-resty-worker-events +for details.
Acquire a lock and run a function
+Acquire a lock and run a function
The function call itself is wrapped with pcall to protect against exception.
@@ -189,11 +187,11 @@init_worker
or log
:
resty.lock
does not
- attempt to sleep/yield"scheduled"
resty.lock
does not
+attempt to sleep/yield"scheduled"
unhealthy.tcp_failures
(for TCP failures) or unhealthy.http_failures
is set to zero in the configuration, this function is a no-op
and returns true
.
@@ -477,7 +475,7 @@ healthy.successes
is set to zero in the configuration,
this function is a no-op and returns true
.
@@ -559,7 +557,7 @@ NOTE: the returned checker
object must be anchored, if not it will be
- removed by Lua's garbage collector and the healthchecks will cease to run.
+ removed by Lua’s garbage collector and the healthchecks will cease to run.
name
: name of the health checkershm_name
: the name of the lua_shared_dict
specified in the Nginx configuration to usechecks.active.type
: "http", "https" or "tcp" (default is "http")ssl_cert
: certificate for mTLS connections (string or parsed object)ssl_key
: key for mTLS connections (string or parsed object)checks.active.timeout
: socket timeout for active checks (in seconds)checks.active.concurrency
: number of targets to check concurrentlychecks.active.http_path
: path to use in GET
HTTP request to run on active checkschecks.active.https_verify_certificate
: boolean indicating whether to verify the HTTPS certificatechecks.active.headers
: one or more lists of values indexed by header namechecks.active.healthy.interval
: interval between checks for healthy targets (in seconds)checks.active.healthy.http_statuses
: which HTTP statuses to consider a successchecks.active.healthy.successes
: number of successes to consider a target healthychecks.active.unhealthy.interval
: interval between checks for unhealthy targets (in seconds)checks.active.unhealthy.http_statuses
: which HTTP statuses to consider a failurechecks.active.unhealthy.tcp_failures
: number of TCP failures to consider a target unhealthychecks.active.unhealthy.timeouts
: number of timeouts to consider a target unhealthychecks.active.unhealthy.http_failures
: number of HTTP failures to consider a target unhealthychecks.passive.type
: "http", "https" or "tcp" (default is "http"; for passive checks, "http" and "https" are equivalent)checks.passive.healthy.http_statuses
: which HTTP statuses to consider a failurechecks.passive.healthy.successes
: number of successes to consider a target healthychecks.passive.unhealthy.http_statuses
: which HTTP statuses to consider a successchecks.passive.unhealthy.tcp_failures
: number of TCP failures to consider a target unhealthychecks.passive.unhealthy.timeouts
: number of timeouts to consider a target unhealthychecks.passive.unhealthy.http_failures
: number of HTTP failures to consider a target unhealthyname
: name of the health checkershm_name
: the name of the lua_shared_dict
specified in the Nginx configuration to usessl_cert
: certificate for mTLS connections (string or parsed object)ssl_key
: key for mTLS connections (string or parsed object)checks.active.type
: “http”, “https” or “tcp” (default is “http”)checks.active.timeout
: socket timeout for active checks (in seconds)checks.active.concurrency
: number of targets to check concurrentlychecks.active.http_path
: path to use in GET
HTTP request to run on active checkschecks.active.https_sni
: SNI server name incase of HTTPSchecks.active.https_verify_certificate
: boolean indicating whether to verify the HTTPS certificatechecks.active.headers
: one or more lists of values indexed by header namechecks.active.healthy.interval
: interval between checks for healthy targets (in seconds)checks.active.healthy.http_statuses
: which HTTP statuses to consider a successchecks.active.healthy.successes
: number of successes to consider a target healthychecks.active.unhealthy.interval
: interval between checks for unhealthy targets (in seconds)checks.active.unhealthy.http_statuses
: which HTTP statuses to consider a failurechecks.active.unhealthy.tcp_failures
: number of TCP failures to consider a target unhealthychecks.active.unhealthy.timeouts
: number of timeouts to consider a target unhealthychecks.active.unhealthy.http_failures
: number of HTTP failures to consider a target unhealthychecks.passive.type
: “http”, “https” or “tcp” (default is “http”; for passive checks, “http” and “https” are equivalent)checks.passive.healthy.http_statuses
: which HTTP statuses to consider a failurechecks.passive.healthy.successes
: number of successes to consider a target healthychecks.passive.unhealthy.http_statuses
: which HTTP statuses to consider a successchecks.passive.unhealthy.tcp_failures
: number of TCP failures to consider a target unhealthychecks.passive.unhealthy.timeouts
: number of timeouts to consider a target unhealthychecks.passive.unhealthy.http_failures
: number of HTTP failures to consider a target unhealthy If any of the health counters above (e.g. checks.passive.unhealthy.timeouts
)
is set to zero, the according category of checks is not taken to account.
This way active or passive health checks can be disabled selectively.
@@ -829,8 +829,8 @@