[Kea-users] statistics-get - computation of # of current leases per pool?
Václav Ovsík
vaclav.ovsik at seznam.cz
Thu Oct 29 17:34:03 UTC 2026
Fellow users of KEA,
I'm trying to migrate from ISC dhcpd to KEA. The current dhcpd server
installations are working in HA load balancing mode and I decided to
use HA hot-standby mode for KEA (according to documentation).
The servers are running Debian 13 Trixie and KEA from trixie-backports version
3.0.3-1~bpo13+1.
Along the KEA replacement I also install monitoring plugin for KEA in
CheckMK (https://codeberg.org/mirabilos/kea-dhcp). It monitors pools
usage by asking the KEA, but I have problem with the results.
My KEA instance has many static host reservations and some pools in some
subnets.
Specifically is problematic subnet with definition:
{
"id": 80,
"subnet": "10.8.160.128/25",
"option-data": [
{ "name": "routers", "data": "10.8.160.129" },
],
"pools": [ { "pool": "10.8.160.242 - 10.8.160.250" } ]
},
There is no dynamic lease from pool, but more static reservations outside of
pool, but the monitoring plugins show the problem - the pool is full because:
# echo '{ "command": "statistic-get", "arguments": { "name": "subnet[80].pool[0].assigned-addresses" } }' | socat UNIX-CONNECT:/run/kea/kea4-ctrl-socket STDIO | json_pp
{
"arguments" : {
"subnet[80].pool[0].assigned-addresses" : [
[
9,
"2026-10-29 08:17:47.707752"
],
[
0,
"2026-10-29 08:17:47.707562"
]
]
},
"result" : 0
}
Yes, I have 9 leases, but outside of pool. Is this bug in the KEA server?
# socat /run/kea/kea4-ctrl-socket STDIO <<< '{ "command": "lease4-get-page", "arguments": { "from": "start", "limit": 100 } }' | jq -r '.arguments.leases[] | select(."subnet-id" == 80)."ip-address"'
10.8.160.140
10.8.160.141
10.8.160.143
10.8.160.145
10.8.160.146
10.8.160.147
10.8.160.148
10.8.160.150
10.8.160.151
The values in the level subnet[80] and subnet[80].pool[0] are the same.
nssrv1.lim.i.cz:/etc/kea# echo '{ "command": "statistic-get", "arguments": { "name": "subnet[80].assigned-addresses" } }' | socat UNIX-CONNECT:/run/kea/kea4-ctrl-socket STDIO | json_pp
{
"arguments" : {
"subnet[80].assigned-addresses" : [
[
9,
"2026-10-29 08:17:47.707724"
],
[
0,
"2026-10-29 08:17:47.707553"
]
]
},
"result" : 0
}
And especially confusing is the value 0 and 9 in very close point in time.
Server restart doesn't help:
# systemctl restart kea-dhcp4-server.service
# echo '{ "command": "statistic-get", "arguments": { "name": "subnet[80].assigned-addresses" } }' | socat UNIX-CONNECT:/run/kea/kea4-ctrl-socket STDIO | json_pp
{
"arguments" : {
"subnet[80].assigned-addresses" : [
[
9,
"2026-10-29 18:27:52.139910"
],
[
0,
"2026-10-29 18:27:52.139706"
]
]
},
"result" : 0
}
I think the value is simply bad according to
https://kea.readthedocs.io/en/kea-3.0.3/arm/dhcp4-srv.html#dhcp4-stats
Sorry for my English.
Any idea?
Regards
--
Zito
More information about the Kea-users
mailing list