aboutsummaryrefslogtreecommitdiff
path: root/plugin/reload/metrics.go
diff options
context:
space:
mode:
authorGravatar Zou Nengren <zounengren@cmss.chinamobile.com> 2020-03-25 21:33:04 +0800
committerGravatar GitHub <noreply@github.com> 2020-03-25 14:33:04 +0100
commit1dba31ee7d7ea5d4d02f3f2f519f25e5c9a3c379 (patch)
treebea207cbd0e67ec288f1a09c969aa484dabef46c /plugin/reload/metrics.go
parent1766568398e3120c85d44f5c6237a724248b652e (diff)
downloadcoredns-1dba31ee7d7ea5d4d02f3f2f519f25e5c9a3c379.tar.gz
coredns-1dba31ee7d7ea5d4d02f3f2f519f25e5c9a3c379.tar.zst
coredns-1dba31ee7d7ea5d4d02f3f2f519f25e5c9a3c379.zip
export config file hash in a metric (#3768)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
Diffstat (limited to 'plugin/reload/metrics.go')
-rw-r--r--plugin/reload/metrics.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugin/reload/metrics.go b/plugin/reload/metrics.go
index 1f790d4c1..de46862a4 100644
--- a/plugin/reload/metrics.go
+++ b/plugin/reload/metrics.go
@@ -14,4 +14,11 @@ var (
Name: "failed_count_total",
Help: "Counter of the number of failed reload attempts.",
})
+
+ reloadInfo = prometheus.NewGaugeVec(prometheus.GaugeOpts{
+ Namespace: plugin.Namespace,
+ Subsystem: "reload",
+ Name: "version_info",
+ Help: "A metric with a constant '1' value labeled by hash, and value which type of hash generated.",
+ }, []string{"hash", "value"})
)