isc_dhcpd

package
v0.0.0-...-6ade924 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

README

ISC DHCPd monitoring with Netdata

ISC DHCP is a DHCP server that supports both IPv4 and IPv6, and is suitable for use in high-volume and high-reliability applications.

This module monitors active leases and IP pools utilization collecting data from the DHCP client lease database (dhcpd.leases).

Requirements

dhcpd.leases must be readable by netdata user.

Metrics

All metrics have "isc_dhcps." prefix.

Metric Scope Dimensions Units
active_leases_total global active leases
pool_active_leases global a dimension per DHCP pool leases
pool_utilization global a dimension per DHCP pool percentage

Configuration

Edit the go.d/isc_dhcpd.conf configuration file using edit-config from the Netdata config directory, which is typically at /etc/netdata.

cd /etc/netdata # Replace this path with your Netdata config directory
sudo ./edit-config go.d/isc_dhcpd.conf

Needs leases_path (path to the DHCP client lease database), and a list of IP pools to monitor. IP pool networks is a space separated list of IP ranges.

Here is a configuration example:

jobs:
  - name: ipv4_example
    leases_path: '/path/to/ipv4_leases_file'
    pools:
      - name: office
        networks: '192.0.2.1-192.0.2.254'
      - name: wifi
        networks: '198.51.100.0/24'
      - name: dmz
        networks: '203.0.113.0/255.255.255.0'

  - name: ipv6_example
    leases_path: '/path/to/ipv6_leases_file'
    pools:
      - name: office
        networks: '2001:0DB8::/64'
      - name: wifi
        networks: '2001:0DB8:0:1::/64'
      - name: dmz
        networks: '2001:0DB8:0:2::/64'

For all available options, see the ISC dhcpd collector's configuration file.

Troubleshooting

To troubleshoot issues with the isc_dhcpd collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    cd /usr/libexec/netdata/plugins.d/
    
  • Switch to the netdata user.

    sudo -u netdata -s
    
  • Run the go.d.plugin to debug the collector:

    ./go.d.plugin -d -m isc_dhcpd
    

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LeasesPath string       `yaml:"leases_path"`
	Pools      []PoolConfig `yaml:"pools"`
}

type DHCPd

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

func New

func New() *DHCPd

func (*DHCPd) Charts

func (d *DHCPd) Charts() *module.Charts

func (*DHCPd) Check

func (d *DHCPd) Check() bool

func (DHCPd) Cleanup

func (DHCPd) Cleanup()

func (*DHCPd) Collect

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

func (*DHCPd) Init

func (d *DHCPd) Init() bool

type PoolConfig

type PoolConfig struct {
	Name     string `yaml:"name"`
	Networks string `yaml:"networks"`
}

Jump to

Keyboard shortcuts

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