Since events do not cost much, the number stored and displayed
is drastically increased.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Since the gaps between alfred calls have been fixed, we can
reduce the waiting time before a router gets offline.
We now only tolerate a single missing data point, but not two
like before.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Value set to only 7 days to reduce database size, since these
data seem to be of little relevance.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Netif information is deleted 48 hours after the MAC addresses
have changed.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Previously, old stats had been only deleted if the router was
online. This required a join with the router table, which caused
locking issues when writing to this table by alfred request.
Now, we just delete old stats ignoring the router state, except
for the router_stats table, which is smaller and thus remains
as before.
In addition, this patch logs the number of rows affected.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This implement to different minimum distances in seconds for the
router stats in general and the netif stats in particular.
The values are chosen so that they are 30 secs. shorter than the
desired timespans of 5 and 10 minutes, to allow for fluctuation
in when data arrives.
This fixes the data density increase caused by V2 Hoods with two
gateways.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>