Skip to main content

GitHub license GitHub tag (latest SemVer) PyPI - Version PyPI - Downloads

kea-exporter

Prometheus Exporter for the ISC Kea DHCP Server.

From v0.4.0 on Kea >=1.3.0 is required, as the configuration, specifically subnet information, will be read from the control socket.

Installation

Package versions via repology.org

The latest stable version can always be installed from PyPi:

$ pip install kea-exporter

and upgraded with:

$ pip install --upgrade kea-exporter

Docker

A docker image is available and can be configured with environment variables see usage section

$ docker pull ghcr.io/mweinelt/kea-exporter

Features

  • DHCP4 & DHCP6 Metrics (tested against Kea 3.2.0)

  • Configuration and statistics via control socket or http api

Currently not working:

  • Automatic config reload (through inotify)

Known Limitations

The following features are not supported yet, help is welcome.

  • Shared Networks

  • Custom Subnet Identifiers

Usage

Pass one or multiple Unix Domain Socket path or HTTP Control-Agent URLs to the kea-exporter executable. All other options are optional.

Usage: python -m kea_exporter [OPTIONS] TARGETS...

Options:
  -a, --address TEXT      Address that the exporter binds to.
  -p, --port INTEGER      Port that the exporter binds to.
  -i, --interval INTEGER  Minimal interval between two queries to Kea in
                          seconds.
  --client-cert PATH      Path to client certificate used to in HTTP requests
  --client-key PATH       Path to client key used in HTTP requests
  --version               Show the version and exit.
  --help                  Show this message and exit.

You can also configure the exporter using environment variables:

export ADDRESS="0.0.0.0"
export PORT="9547"
export INTERVAL="7.5"
export TARGETS="http://router.example.com:8000"
export CLIENT_CERT="/etc/kea-exporter/client.crt"
export CLIENT_KEY="/etc/kea-exporter/client.key"

Configure Control Socket

The exporter uses Kea’s control socket to request both configuration and statistics. Consult the documentation on how to set up the control socket:

HTTPS

If you need to validate a self-signed certificate on a Kea instance, you can set REQUESTS_CA_BUNDLE environment variable to a bundle CA path.

Permissions

Kea Exporter needs to be able to read and write on the socket, hence it’s permissions might need to be modified accordingly.

Grafana-Dashboard

A dashboard for this exporter is available at https://grafana.com/grafana/dashboards/12688.

Release files for kea-exporter 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kea-exporter 0.7.1
File Size Uploaded
kea_exporter-0.7.1.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kea-exporter 0.7.1
File Interpreter ABI Platform
kea_exporter-0.7.1-py3-none-any.whl Python 3 none any Details

Total release size:19.9 kB

Release files / kea_exporter-0.7.1.tar.gz

Download URL kea_exporter-0.7.1.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6799fbeafcd92e744eb46288a92005fa0be3ac4d3ecc95de7335c2c4520711cc
BLAKE2b-256 checksum
How to use checksums
02ae0801dac90edf246ab5fb597e85ee1d6c905a7c4d07021d6b06103dfa220e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.28.0 CPython/3.12.3 Linux/6.17.0-1018-azure

Release files / kea_exporter-0.7.1-py3-none-any.whl

Download URL kea_exporter-0.7.1-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa2b02a805aea5c61a608450752d99887f06c72d1146f723fb9ba7a1a1e82216
BLAKE2b-256 checksum
How to use checksums
7a03a13995357f4e33c77fcadebdae43f3509ed17db5af89ef6ef6ca794e87ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.28.0 CPython/3.12.3 Linux/6.17.0-1018-azure

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page