Overloaded (#1364)

* plugin/health: add 'overloaded metrics'

Query our on health endpoint and record (and export as a metric) the
time it takes. The Get has a 5s timeout, that, when reached, will set
the metric duration to 5s. The actually call "I'm I overloaded" is left
to an external entity.

* README

* golint and govet

* and the tests
This commit is contained in:
Miek Gieben
2018-01-10 11:41:22 +00:00
committed by GitHub
parent cced1a4c12
commit 48059a6c3e
5 changed files with 90 additions and 7 deletions

View File

@@ -25,6 +25,14 @@ supports health checks has a section "Health" in their README.
Any plugin that implements the Healther interface will be used to report health.
## Metrics
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
be a local operation it should be fast. A (large) increases in this duration indicates the
CoreDNS process is having trouble keeping up.
## Examples
Run another health endpoint on http://localhost:8091.