plugin/metrics: Add a metric to monitor which plugin(s) is(are) enabled (#2700)

* Add a GaugeVec for enabled plugins monitoring.

Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>

* Add server label and zone label for enable_plugin matric.

* Add a test for PluginEnabled metric

* Add description for enabledPlugin metric.

* Change the description for the enabledPlugin metric.

* Reset the enabledPlugin metric when restart the server.

* Add the bug session for enabledPlugin metric.

* Remove the resolveTCPAddr
This commit is contained in:
Jiacheng Xu
2019-03-23 10:43:15 +01:00
committed by Miek Gieben
parent a3dd8cdf8d
commit 0e137b23f1
5 changed files with 63 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ func New(addr string) *Metrics {
met.MustRegister(vars.RequestType)
met.MustRegister(vars.ResponseSize)
met.MustRegister(vars.ResponseRcode)
met.MustRegister(vars.PluginEnabled)
return met
}