collector

package
v0.2.1-alpha.2-trueneu Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package collector collects dnsmasq statistics as a Prometheus collector.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector implements prometheus.Collector and exposes dnsmasq metrics.

func New

func New(cfg Config) *Collector

New creates a new Collector.

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

type Config

type Config struct {
	DnsClient    *dns.Client
	DnsmasqAddr  string
	LeasesPath   string
	ExposeLeases bool
	IgnoreLeases bool
}

Config contains the configuration for the collector.

Jump to

Keyboard shortcuts

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