Documentation ¶
Overview ¶
Package dnsmasq_exporter embeds https://github.com/google/dnsmasq_exporter
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ DnsmasqAddress: "localhost:53", LeasesPath: "/var/lib/misc/dnsmasq.leases", ExposeLeases: false, }
DefaultConfig is the default config for dnsmasq_exporter.
Functions ¶
func New ¶
func New(log log.Logger, c *Config) (integrations.Integration, error)
New creates a new dnsmasq_exporter integration. The integration scrapes metrics from a dnsmasq server.
Types ¶
type Config ¶
type Config struct { // DnsmasqAddress is the address of the dnsmasq server (host:port). DnsmasqAddress string `yaml:"dnsmasq_address,omitempty"` // LeasesFile is the path to the dnsmasq leases file. LeasesPath string `yaml:"leases_path,omitempty"` // ExposeLeases controls whether expose dnsmasq leases as metrics (high cardinality). ExposeLeases bool `yaml:"expose_leases,omitempty"` }
Config controls the dnsmasq_exporter integration.
func (*Config) InstanceKey ¶ added in v0.21.0
InstanceKey returns the address of the dnsmasq server.
func (*Config) Name ¶ added in v0.10.0
Name returns the name of the integration that this config is for.
func (*Config) NewIntegration ¶ added in v0.10.0
func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)
NewIntegration converts this config into an instance of an integration.
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler for Config.
Click to show internal directories.
Click to hide internal directories.