mirror of
https://github.com/hanzoai/dns.git
synced 2026-10-30 18:40:55 +00:00
Mechanical migration following the beego v2.3.8 fork precedent (bc7b075). Same exposition surface, zero prometheus/client_golang in the dep graph.
25 lines
694 B
Go
25 lines
694 B
Go
package hosts
|
|
|
|
import (
|
|
"github.com/coredns/coredns/plugin"
|
|
|
|
metric "github.com/luxfi/metric"
|
|
)
|
|
|
|
var (
|
|
// hostsEntries is the combined number of entries in hosts and Corefile.
|
|
hostsEntries = metric.NewGaugeVec(metric.GaugeOpts{
|
|
Namespace: plugin.Namespace,
|
|
Subsystem: "hosts",
|
|
Name: "entries",
|
|
Help: "The combined number of entries in hosts and Corefile.",
|
|
}, []string{"hostsfile"})
|
|
// hostsReloadTime is the timestamp of the last reload of hosts file.
|
|
hostsReloadTime = metric.NewGauge(metric.GaugeOpts{
|
|
Namespace: plugin.Namespace,
|
|
Subsystem: "hosts",
|
|
Name: "reload_timestamp_seconds",
|
|
Help: "The timestamp of the last reload of hosts file.",
|
|
})
|
|
)
|