mirror of
https://github.com/coredns/coredns.git
synced 2025-12-07 02:45:11 -05:00
hosts: add hostsfile as label for coredns_hosts_entries (#6801)
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
This commit is contained in:
@@ -138,7 +138,7 @@ func (h *Hostsfile) readHosts() {
|
||||
h.mtime = stat.ModTime()
|
||||
h.size = stat.Size()
|
||||
|
||||
hostsEntries.WithLabelValues().Set(float64(h.inline.Len() + h.hmap.Len()))
|
||||
hostsEntries.WithLabelValues(h.path).Set(float64(h.inline.Len() + h.hmap.Len()))
|
||||
hostsReloadTime.Set(float64(stat.ModTime().UnixNano()) / 1e9)
|
||||
h.Unlock()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user