[Kea-users] stat-lease4-get not returning current lease statistics
Emile Swarts
emile at madetech.com
Thu Jan 14 13:37:09 UTC 2021
Hi,
I'm calling stat-lease4-get but this doesn't seem to be updating when new
leases are issued.
I have about 800 subnets configured, but omitted these from the sql results
below.
I can confirm that the leases are in the lease4 db table and not reclaimed
yet:
mysql> select * from lease4;
+-----------+----------------+----------------------+----------------+---------------------+-----------+----------+----------+----------+-------+--------------+
| address | hwaddr | client_id | valid_lifetime |
expire | subnet_id | fqdn_fwd | fqdn_rev | hostname | state |
user_context |
+-----------+----------------+----------------------+----------------+---------------------+-----------+----------+----------+----------+-------+--------------+
| 179437569 | 0x000C01020304 | 0x01000C01020304 | 4000 |
2021-01-14 13:51:03 | 4327 | 0 | 0 | | 0 |
NULL |
| 179437570 | 0x000C01020305 | 0x01000C01020305 | 4000 |
2021-01-14 13:51:03 | 4327 | 0 | 0 | | 0 |
NULL |
...
I can also see that lease4_stat contains the following:
mysql> select * from lease4_stat;
+-----------+-------+--------+
| subnet_id | state | leases |
+-----------+-------+--------+
| 4327 | 0 | 254 |
+-----------+-------+--------+
2 rows in set (0.00 sec)
The result of the API call "stat-lease4-get" returns the following:
"rows"=>[[4327, 253, 0, 0, 0]]
I'd expect the 3rd column "assigned-addresses" to match what's in the db
tables.
I've tried running "statistic-reset-all" to see if this makes a difference
but it's not recalculated the new statistics.
Are these statistics only kept in memory? Do you have any resources that
could help me debug this issue?
Thanks,
Emile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20210114/e831000b/attachment.htm>
More information about the Kea-users
mailing list