Export Kea Metrics in the Prometheus Exposition Format
Project description
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
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 1.6.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
Usage: kea-exporter [OPTIONS] [SOCKETS]... Options: -m, --mode [socket|http] Select mode. -a, --address TEXT Specify the address to bind against. -p, --port INTEGER Specify the port on which to listen. -i, --interval INTEGER Specify the metrics update interval in seconds. -t, --target TEXT Target address and port of Kea server, e.g. http://kea.example.com:8080. --client-cert TEXT Client certificate file path used in HTTP mode with mTLS --client-key TEXT Client key file path used in HTTP mode with mTLS --version Show the version and exit. --help Show this message and exit.
You can also configure the exporter using environment variables:
export MODE="http" export ADDRESS="0.0.0.0" export PORT="9547" export INTERVAL="7.5" export TARGET="http://kea" 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kea_exporter-0.6.0.tar.gz
.
File metadata
- Download URL: kea_exporter-0.6.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.12.4 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af4a67c810f5f75eb40daf079cadea84d40e7a9b17b084b0510a0f25198176ee |
|
MD5 | ec91e10dc3330667f49b1c431771c66f |
|
BLAKE2b-256 | b48339dd64775045ff79fad6929f7dd310396ca1d5201e908a046433d7676c3b |
File details
Details for the file kea_exporter-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: kea_exporter-0.6.0-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.12.4 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6c17def8d34e1c3f04bfef3f40f00bd408a418fb9d5056dd15fb05cbf5aaafd |
|
MD5 | 91b7c83cb4efea26fcf09c452dd844a7 |
|
BLAKE2b-256 | d9111d20d8f7435c5b04e4a46fac194dc141ebb7d81635756d0882f042973d2b |