This only works for routers with updated nodewatcher.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Previously, mesh routers without coordinates are assigned to the
default hood, even if they are meshing with routers from other
hoods.
To keep the default hood clean, we introduce the "NoCoordinates"
hood for all those routers.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This has to be done BEFORE the status is set, since otherwise
the selector won't work anymore.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This is required to uniquely find the relation between VPN and
bat after change of MAC adresses.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Keep br-* interfaces, throw away l2tp.
Seems like batctl gwl only shows br-* or fff*, but never l2tp*.
Seems to be required to support V1 gateways with L2TP.
The main impact on table size is done by l2tp*.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
The clients per GW cannot by determined reliably in the
Monitoring. Thus, we remove the column and readd the previously
removed "unknown" column.
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>
Gateways are listed alphabetically based on their name, then all
without name based on their MAC address.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Introduces two new query parameters:
bat:<mac> looks for routers being aware of the specified gateway
batselected:<mac> looks for routers CONNECTED to the specified gw
Both variants support regex.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This replaces UPDATE IF SELECT ELSE INSERT by ON DUPLICATE KEY
UPDATE. In addition, queries have been consolidated by ordering
data in advance and then using executemany.
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>
This adds gateway stats which work similar to the detailed hood
statistics.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Introduces two new query parameters:
gw:<mac> looks for routers being aware of the specified gateway
selected:<mac> looks for routers CONNECTED to the specified gw
Both variants support regex.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Minimum percentage for firmware increased to 2 per cent, for
routers increased to 3 per cent.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This includes various changes throughout the code. Additionally,
some fields are reordered.
This requires a change of the MySQL table router_neighbor!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Previously, I just deleted all entries and recreated them again
with INSERT. Although this is simple to write and actually includes
less queries, it causes a lot more write IO. Since most of the
neighbors and interfaces do NOT change frequently, it is worth the
extra effort to delete only those really gone since the last
update.
Only br-mesh will normally have assigned IPv6 addresses, thus
we just delete all IPv6 adresses of the other ones.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>