Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllMetrics = []MetricName{ CacheHits, CacheMisses, CacheEvictions, CacheInsertions, CacheSize, }
AllMetrics is a list of all exported metrics.
Functions ¶
This section is empty.
Types ¶
type MetricName ¶
type MetricName string
MetricName is a metric
const ( // CacheHits from dnsmasq. CacheHits MetricName = "hits" // CacheMisses from dnsmasq CacheMisses MetricName = "misses" // CacheEvictions from dnsmasq CacheEvictions MetricName = "evictions" // CacheInsertions from dnsmasq CacheInsertions MetricName = "insertions" // CacheSize from dnsmasq CacheSize MetricName = "cachesize" )
type Metrics ¶
type Metrics map[MetricName]int64
Metrics exported by dnsmasq via *.bind CHAOS queries.
type MetricsClient ¶
MetricsClient is a client used to obtain metrics from dnsmasq.
func NewMetricsClient ¶
func NewMetricsClient(addr string, port int) MetricsClient
NewMetricsClient creates a new client for getting raw metrics from dnsmasq via the *.bind CHAOS TXT records. Note: this feature works for dnsmasq v2.76+, it is missing in older releases of the software.
Click to show internal directories.
Click to hide internal directories.