mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
plugin/prometheuss : make plugin enabled metric view aware (#5618)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com> Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
This commit is contained in:
@@ -39,7 +39,7 @@ func setup(c *caddy.Controller) error {
|
||||
for _, h := range conf.ListenHosts {
|
||||
addrstr := conf.Transport + "://" + net.JoinHostPort(h, conf.Port)
|
||||
for _, p := range conf.Handlers() {
|
||||
vars.PluginEnabled.WithLabelValues(addrstr, conf.Zone, p.Name()).Set(1)
|
||||
vars.PluginEnabled.WithLabelValues(addrstr, conf.Zone, conf.ViewName, p.Name()).Set(1)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
@@ -49,7 +49,7 @@ func setup(c *caddy.Controller) error {
|
||||
for _, h := range conf.ListenHosts {
|
||||
addrstr := conf.Transport + "://" + net.JoinHostPort(h, conf.Port)
|
||||
for _, p := range conf.Handlers() {
|
||||
vars.PluginEnabled.WithLabelValues(addrstr, conf.Zone, p.Name()).Set(1)
|
||||
vars.PluginEnabled.WithLabelValues(addrstr, conf.Zone, conf.ViewName, p.Name()).Set(1)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user