export config file hash in a metric (#3768)

Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
This commit is contained in:
Zou Nengren 2020-03-25 21:33:04 +08:00 committed by GitHub
parent 1766568398
commit 1dba31ee7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 3 deletions

View file

@ -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"})
)