aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Zou Nengren <zounengren@cmss.chinamobile.com> 2020-06-24 12:54:03 +0800
committerGravatar GitHub <noreply@github.com> 2020-06-24 06:54:03 +0200
commit73e927d6a813677a075adf6fe82281cdabe82f24 (patch)
tree9214690287213c6b4af576e2d038f289bb18d2a2
parent55a33aa9d2c90fb2e7ddbe8d091a7dbc03af78d9 (diff)
downloadcoredns-73e927d6a813677a075adf6fe82281cdabe82f24.tar.gz
coredns-73e927d6a813677a075adf6fe82281cdabe82f24.tar.zst
coredns-73e927d6a813677a075adf6fe82281cdabe82f24.zip
completed metrics of cache and forward (#3962)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
-rw-r--r--man/coredns-cache.72
-rw-r--r--man/coredns-forward.76
-rw-r--r--plugin/cache/README.md1
-rw-r--r--plugin/forward/README.md3
-rw-r--r--plugin/forward/metrics.go2
5 files changed, 10 insertions, 4 deletions
diff --git a/man/coredns-cache.7 b/man/coredns-cache.7
index 7d54d48cb..b828d0fb1 100644
--- a/man/coredns-cache.7
+++ b/man/coredns-cache.7
@@ -100,6 +100,8 @@ If monitoring is enabled (via the \fIprometheus\fP plugin) then the following me
.IP \(bu 4
\fB\fCcoredns_cache_misses_total{server}\fR - Counter of cache misses.
.IP \(bu 4
+\fB\fCcoredns_cache_prefetch_total{server}\fR - Counter of cache has prefetched a cached item.
+.IP \(bu 4
\fB\fCcoredns_cache_drops_total{server}\fR - Counter of responses excluded from the cache due to request/response question name mismatch.
.IP \(bu 4
\fB\fCcoredns_cache_served_stale_total{server}\fR - Counter of requests served from stale cache entries.
diff --git a/man/coredns-forward.7 b/man/coredns-forward.7
index a33d073cb..8709b7ec3 100644
--- a/man/coredns-forward.7
+++ b/man/coredns-forward.7
@@ -163,9 +163,11 @@ The read timeout is static at 2s.
If monitoring is enabled (via the \fIprometheus\fP plugin) then the following metric are exported:
.IP \(bu 4
-\fB\fCcoredns_forward_request_duration_seconds{to}\fR - duration per upstream interaction.
+\fB\fCcoredns_forward_requests_total{to}\fR - Counter of requests made per upstream.
+.IP \(bu 4
+\fB\fCcoredns_forward_responses_total{to}\fR - Counter of responses made per upstream.
.IP \(bu 4
-\fB\fCcoredns_forward_requests_total{to}\fR - query count per upstream.
+\fB\fCcoredns_forward_request_duration_seconds{to}\fR - duration per upstream interaction.
.IP \(bu 4
\fB\fCcoredns_forward_responses_total{to, rcode}\fR - count of RCODEs per upstream.
.IP \(bu 4
diff --git a/plugin/cache/README.md b/plugin/cache/README.md
index 6c343fe12..8e7c24d9e 100644
--- a/plugin/cache/README.md
+++ b/plugin/cache/README.md
@@ -73,6 +73,7 @@ If monitoring is enabled (via the *prometheus* plugin) then the following metric
* `coredns_cache_entries{server, type}` - Total elements in the cache by cache type.
* `coredns_cache_hits_total{server, type}` - Counter of cache hits by cache type.
* `coredns_cache_misses_total{server}` - Counter of cache misses.
+* `coredns_cache_prefetch_total{server}` - Counter of cache has prefetched a cached item.
* `coredns_cache_drops_total{server}` - Counter of responses excluded from the cache due to request/response question name mismatch.
* `coredns_cache_served_stale_total{server}` - Counter of requests served from stale cache entries.
diff --git a/plugin/forward/README.md b/plugin/forward/README.md
index e745e2970..54810fbac 100644
--- a/plugin/forward/README.md
+++ b/plugin/forward/README.md
@@ -107,8 +107,9 @@ On each endpoint, the timeouts for communication are set as follows:
If monitoring is enabled (via the *prometheus* plugin) then the following metric are exported:
-* `coredns_forward_request_duration_seconds{to}` - duration per upstream interaction.
* `coredns_forward_requests_total{to}` - query count per upstream.
+* `coredns_forward_responses_total{to}` - Counter of responses made per upstream.
+* `coredns_forward_request_duration_seconds{to}` - duration per upstream interaction.
* `coredns_forward_responses_total{to, rcode}` - count of RCODEs per upstream.
* `coredns_forward_healthcheck_failures_total{to}` - number of failed health checks per upstream.
* `coredns_forward_healthcheck_broken_total{}` - counter of when all upstreams are unhealthy,
diff --git a/plugin/forward/metrics.go b/plugin/forward/metrics.go
index 4122bc210..07aa1a6ed 100644
--- a/plugin/forward/metrics.go
+++ b/plugin/forward/metrics.go
@@ -18,7 +18,7 @@ var (
Namespace: plugin.Namespace,
Subsystem: "forward",
Name: "responses_total",
- Help: "Counter of requests made per upstream.",
+ Help: "Counter of response made per upstream.",
}, []string{"rcode", "to"})
RequestDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Namespace: plugin.Namespace,