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.

Requirements

Compatibility

  • This plugin is tested with Kea v3.0 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-2.0.0.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netbox_kea-2.0.0-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: netbox_kea-2.0.0.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for netbox_kea-2.0.0.tar.gz
Algorithm Hash digest
SHA256 253b0cc6ece2fde18243a5f31478faeb6308304ca7fa1ebda27a79cf2e6fd740
MD5 be210c07db9967f129e15187bddd52d9
BLAKE2b-256 b311a1c122803597afe8261c02e134577ac6187ea6044016e9d28373d44b974a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: netbox_kea-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 29.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for netbox_kea-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cc9f14e215c246ec24af38ccccfbafca3f2ba5915b5e00595da6b9e35d6f424
MD5 f1e681fea8b0d04fb243c2569a1d42be
BLAKE2b-256 8b7a82298e2dd681b504d16f7ad5c1c8cab1ad18dec8b2e64740fc62fa5e097e

See more details on using hashes here.

Supported by

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