Commit 98c7a6ef authored by Miek Gieben's avatar Miek Gieben Committed by Yong Tang

plugin/health: clarify use a bit (#2791)

Make clearer how health works and that is it process wide.
Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
parent 5aafa987
...@@ -29,7 +29,7 @@ health [ADDRESS] { ...@@ -29,7 +29,7 @@ health [ADDRESS] {
* Where `lameduck` will make the process unhealthy then *wait* for **DURATION** before the process * Where `lameduck` will make the process unhealthy then *wait* for **DURATION** before the process
shuts down. shuts down.
If you have multiple Server Blocks, *health* should only be enabled in one of them (as it is process If you have multiple Server Blocks, *health* can only be enabled in one of them (as it is process
wide). If you really need multiple endpoints, you must run health endpoints on different ports: wide). If you really need multiple endpoints, you must run health endpoints on different ports:
~~~ corefile ~~~ corefile
...@@ -44,13 +44,15 @@ net { ...@@ -44,13 +44,15 @@ net {
} }
~~~ ~~~
Doing this is supported but both endponts ":8080" and ":8081" will export the exact same health.
## Metrics ## Metrics
If monitoring is enabled (via the *prometheus* directive) then the following metric is exported: If monitoring is enabled (via the *prometheus* directive) then the following metric is exported:
* `coredns_health_request_duration_seconds{}` - duration to process a /health query. As this should * `coredns_health_request_duration_seconds{}` - duration to process a HTTP query to the local
be a local operation it should be fast. A (large) increases in this duration indicates the `/health` endpoint. As this a local operation it should be fast. A (large) increase in this
CoreDNS process is having trouble keeping up with its query load. duration indicates the CoreDNS process is having trouble keeping up with its query load.
Note that this metric *does not* have a `server` label, because being overloaded is a symptom of Note that this metric *does not* have a `server` label, because being overloaded is a symptom of
the running process, *not* a specific server. the running process, *not* a specific server.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment