[Kea-users] statistics-get - computation of # of current leases per pool?

Darren Ankney darren.ankney at gmail.com
Sun Nov 8 10:14:12 UTC 2026


Hi Thorsten,

> What is the meaning of this? What does this signify, semantically?

There may be several samples in the statistics output.  Kea keeps (I
think) the last 10 samples.  This can be set with:
https://kea.readthedocs.io/en/stable/arm/stats.html#the-statistic-sample-count-set-command
As for why there are two samples very close together, I am not sure.
Perhaps some timing issue just after a daemon start or similar.

> But the OP seems to have reservations *outside* of the pools, within the subnet, but not in any pools. So why are these seemingly also
counted to pool#0?

This is a good point.  Since there are both:

subnet[id].assigned-addresses

and

subnet[id].pool[pid].assigned-addresses

However, I think the concept of "pool[pid]" came later.  Originally, I
think Kea only showed per subnet statistics (IIRC).  It is possible to
know about stastistics outside of any pool in the subnet by:
- setting a pool id greater than 1 in each pool in the subnet
- adding all pool stats together from pools > 1
- subtracting this number from the pool[0] number.

That should give you both the assigned addresses both inside and
outside the pool(s).

Thank you,

Darren Ankney

On Tue, Nov 3, 2026 at 12:43 PM Thorsten Glaser via Kea-users
<kea-users at lists.isc.org> wrote:
>
> Hi,
>
> I’m the one who cobbled together that CheckMK plugin.
>
> I do have some questions. Some, we can probably figure out with
> some debugging, but:
>
> In the original example posted…
>
>         "subnet[80].pool[0].assigned-addresses" : [
>            [
>               9,
>               "2026-10-29 08:17:47.707752"
>            ],
>            [
>               0,
>               "2026-10-29 08:17:47.707562"
>            ]
>         ]
>
> … this JSONArray has *two* elements, not just one.
>
> What is the meaning of this? What does this signify, semantically?
>
> On one of the systems of my customer, I see:
>
>     "subnet[3].pool[0].assigned-addresses": [
>       [
>         0,
>         "2026-10-22 19:25:43.664495"
>       ],
>       [
>         1,
>         "2026-10-22 13:25:18.506467"
>       ],
>       [
>         0,
>         "2026-10-20 07:15:56.600543"
>       ],
>       [
>         0,
>         "2026-10-20 07:15:56.599290"
>       ]
>     ],
>
> So here, this is clearly historic data and I just take the first
> subelement only.
>
> And: the docs say…
>
> | If not configured, pool-id defaults to 0. The statistics related to
> | pool ID 0 refer to all the statistics of all the pools that have an
> | unconfigured pool-id.
>
> But the OP seems to have reservations *outside* of the pools, within
> the subnet, but not in any pools. So why are these seemingly also
> counted to pool#0?
>
> Thanks in advance,
> //Thorsten
>
> PS: Please Cc me, I’ve turned general mail delivery off, but can
>     look into the web archive from time to time.
> --
> Thorsten Glaser
> Linux / Unix Developer
> Tel.: +49 160 91168501
> E-Mail: tglaser at b1-systems.de
>
> B1 Systems GmbH
> Osterfeldstraße 7 / 85088 Vohburg / https://www.b1-systems.de/
> GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt, HRB 3537
> --
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> Kea-users at lists.isc.org


More information about the Kea-users mailing list