dnsmasq_dhcp

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: GPL-3.0 Imports: 16 Imported by: 1

README

dnsmasq_dhcp

This module will monitor Dnsmasq DHCP leases database.

It produces the following set of charts for every dhcp-range:

  1. DHCP Range Allocated Leases in leases

  2. DHCP Range Utilization in percentage

configuration

Module automatically detects all configured dhcp-ranges reading dnsmasq configuration files.

By default it uses:

  • /var/lib/misc/dnsmasq.leases to read leases.
  • /etc/dnsmasq.conf to detect dhcp-ranges.
  • /etc/dnsmasq.d to find additional configurations.

Here is an example:

jobs:
  - name         : dnsmasq_dhcp
    leases_path  : /var/lib/misc/dnsmasq.leases
    conf_path    : /etc/dnsmasq.conf
    conf_dir     : /etc/dnsmasq.d

For all available options please see module configuration file.


Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Charts

type Charts = module.Charts

Charts is an alias for module.Charts

type Config

type Config struct {
	LeasesPath string `yaml:"leases_path"`
	ConfPath   string `yaml:"conf_path"`
	ConfDir    string `yaml:"conf_dir"`
}

Config is the DnsmasqDHCP module configuration.

func (Config) String

func (c Config) String() string

type ConfigFinder added in v0.9.0

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

type Dim

type Dim = module.Dim

Dim is an alias for module.Dim

type DnsmasqDHCP

type DnsmasqDHCP struct {
	module.Base
	Config `yaml:",inline"`
	// contains filtered or unexported fields
}

DnsmasqDHCP DnsmasqDHCP module.

func New

func New() *DnsmasqDHCP

New creates DnsmasqDHCP with default values.

func (DnsmasqDHCP) Charts

func (d DnsmasqDHCP) Charts() *Charts

Charts creates Charts.

func (*DnsmasqDHCP) Check

func (d *DnsmasqDHCP) Check() bool

Check makes check.

func (DnsmasqDHCP) Cleanup

func (DnsmasqDHCP) Cleanup()

Cleanup makes cleanup.

func (*DnsmasqDHCP) Collect

func (d *DnsmasqDHCP) Collect() map[string]int64

Collect collects metrics.

func (*DnsmasqDHCP) Init

func (d *DnsmasqDHCP) Init() bool

Init makes initialization.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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