GSoC 2019: Kea statistics enhancements - support for storing more than one sample
Kea is currently able to report dozens of statistics. However, for each statistic there is only one specific value being reported. For certain types of activities it is highly desirable to have multiple observations over time. Having many data points gives an insight into processes that are changing over time, e.g. daily patterns in user activities, DOS detection and mitigation etc. Therefore the primary task of that issue is expanding the method of collecting observations in Kea by adding the possibility to collecting statistics as time-series ‘buckets’.
What I would like to achieve in this issue is extending of storing samples in Kea. I am going to do this by:
- changing the way of adding new samples in Observation class method setValueInternal,
- realizing the implementation of setMaxSampleAge and setMaxSampleCount methods, both in StatsMgr and Observation classes,
- by default setting the MaxSampleCount to 20 for each Observation and leaving setMaxSampleAge disactivated
- changing "statistic-get" command which is implemented as Observation class method getJSON to enable retrieval all available samples for each statistics not only one value.
Changes are going to be done in stats_mgr.h stats_mgr.cc, observation.cc observation.h files and in their unittests.