dnsmasq_exporter

package
v0.21.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package dnsmasq_exporter embeds https://github.com/google/dnsmasq_exporter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New creates a new dnsmasq_exporter integration. The integration scrapes metrics from a dnsmasq server.

Types

type Config

type Config struct {
	Common config.Common `yaml:",inline"`

	// DnsmasqAddress is the address of the dnsmasq server (host:port).
	DnsmasqAddress string `yaml:"dnsmasq_address,omitempty"`

	// Path to the dnsmasq leases file.
	LeasesPath string `yaml:"leases_path,omitempty"`
}

Config controls the dnsmasq_exporter integration.

var DefaultConfig Config = Config{
	DnsmasqAddress: "localhost:53",
	LeasesPath:     "/var/lib/misc/dnsmasq.leases",
}

DefaultConfig is the default config for dnsmasq_exporter.

func (*Config) CommonConfig

func (c *Config) CommonConfig() config.Common

CommonConfig returns the set of common settings shared across all integrations.

func (*Config) InstanceKey added in v0.21.0

func (c *Config) InstanceKey(agentKey string) (string, error)

InstanceKey returns the address of the dnsmasq server.

func (*Config) Name added in v0.10.0

func (c *Config) Name() string

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

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler for Config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL