Skip to main content

No project description provided

Project description

NetBox plugin for the Kea DHCP server

This plugin allows you to view Kea status, leases and subnets in NetBox. Go directly from a NetBox device/VM to a DHCP lease and back!

Features

  • Uses the Kea management API
  • View Kea daemon statuses.
  • Supports Kea's DHCPv4 and DHCPv6 servers.
  • View, delete, export and search for DHCP leases.
  • Search for NetBox devices/VMs directly from DHCP leases.
  • View DHCP subnets from Kea's configuration.
  • REST API and GraphQL support for managing Server objects.

Screenshot of DHCP leases

Limitations

  • Due to limitations in the Kea management API, pagination is only supported when searching for leases by subnet. Additionally, you can only go forwards, not backwards.

  • Searching for leases by subnet ID does not support pagination. This may be an expensive operation depending on the subnet size.

  • Kea doesn't provide a way to get a list of subnets without an additional hook library. Thus, this plugin lists subnets using the config-get command. This means that the entire config will be fetched just to get the configured subnets! This may be an expensive operation.

Requirements

Compatibility

  • This plugin is tested with Kea v2.4.1 with the memfile lease database. Other versions and lease databases may also work.

Installation

  1. Add netbox-kea to local_requirements.txt.

  2. Enable the plugin in configuration.py

    PLUGINS = ["netbox_kea"]
    
  3. Run ./manage.py migrate

Custom Links

You can add custom links to NetBox models to easily search for leases.

Make sure to replace <Kea Server ID> in the link URL with the object ID of your Kea server. To find a server's ID, open the page for the server and look at the top right corner for netbox_kea.server:<Server ID Here>.

Show DHCP leases for a prefix

Content types: IPAM > Prefix

Link URL: https://netbox.example.com/plugins/kea/servers/<Kea Server ID>/leases{{ object.prefix.version }}/?q={{ object.prefix }}&by=subnet

Show DHCP leases for a device/VM interface (by MAC):

Content types: DCIM > Interface, Virtualization > Interface

Link URL (DHCPv4): https://netbox.example.com/plugins/kea/servers/<Kea Server ID>/leases4/?q={{ object.mac_address }}&by=hw

Link URL (DHCPv6): https://netbox.example.com/plugins/kea/servers/<Kea Server ID>/leases6/?q={{ object.mac_address }}&by=hw

Show DHCP leases for a device/VM (by name):

Content types: DCIM > Device, Virtualization > Virtual Machine

Link URL (DHCPv4): https://netbox.example.com/plugins/kea/servers/<Kea Server ID>/leases4/?q={{ object.name|lower }}&by=hostname

Link URL (DHCPv4): https://netbox.example.com/plugins/kea/servers/<Kea Server ID>/leases6/?q={{ object.name|lower }}&by=hostname

You may also use a custom field by replacing {{ object.name|lower }} with {{ object.cf.<your custom field>|lower }}.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netbox_kea-1.0.1.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

netbox_kea-1.0.1-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file netbox_kea-1.0.1.tar.gz.

File metadata

  • Download URL: netbox_kea-1.0.1.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for netbox_kea-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b7d2625e9893eb1b4c015b39974eb905dcb6d95f45ed43de3bf97e896cf40620
MD5 4428e5ca3bdb31e94a06cb8c0a0eb226
BLAKE2b-256 0f45b36965d4f90e80cefe5fd53e0f1b025518f4543127c92db9343888a4f937

See more details on using hashes here.

File details

Details for the file netbox_kea-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: netbox_kea-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for netbox_kea-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f938bce91b762b53cdc3229b8dad64d5f74ea9ce3e01eac8956c9bd609e23495
MD5 c8ee8fb785ac4c4f9dfb912adb453617
BLAKE2b-256 57cd51ac87e768e4050cd80026418c3c1bb8bed07866a14c3c99f4c64d2d7021

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page