[Kea-users] Statistics and control channel

Tomek Mrugalski tomasz at isc.org
Wed Jul 8 10:17:12 UTC 2015


On 02.07.2015 17:24, Chaigneau, Nicolas wrote:
> 1)
> I've noticed that each statistics is returned as an array of array.
> 
> For example:
> 
> { "arguments": { "subnet[1001].total-addresses": [ [ 262141, "2015-Jul-2 15:47:31.450818" ] ] }, "result": 0 }
> 
> Is this on purpose ? do you plan to add statistics with multiple values in the future ?
Yes. You guessed right. The idea is to allow storing multiple values. If
you look at the design page (http://kea.isc.org/wiki/StatsDesign),
you'll notice that two operations are mentioned:

- setMaxSampleAge, which allows you to keep observations from the last X
seconds

- setMaxSampleCount, which allows you to keep the last X observations

Both are designed, but sadly they didn't make it into 0.9.2. So for now
each statistic can have exactly one (the latest) observation. Once
support for keeping more observations will be added, it will not change
the data format.

> 2)
> Is there a way to retrieve all statistics associated to a given subnet ? (or to all subnets ?)
> 
> I tried the following queries (hoping they would magically work - but no such luck):
> 
> { "command": "statistic-get", "arguments": { "name": "subnet[1001]" } }
> { "command": "statistic-get", "arguments": { "name": "subnet[1001].*" } }
> { "command": "statistic-get", "arguments": { "name": "subnet[*]" } }
No, no wildcards support yet. But I like your proposals. Can you submit
two tickets: one for getting all parameters from a given subnet and
another for getting all parameters from all subnets?

> 3)
> Also, the documentation does not currently list the name of known statistics. I believe this could be useful (even though one can get them empirically with "statistic-get-all").
They are documented. See Section 7.6 of the User's Guide:
http://git.kea.isc.org/~tester/kea/guide/kea-guide.html#dhcp4-stats

> This feature looks promising. Keep up the good work :)
Thanks!

Tomek




More information about the Kea-users mailing list