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>
This provides lists of V2 routers to be used in DNS servers:
/api/dnslist - Plain tab-separated list to be used in custom scripts
/api/dnsentries - List of zone file entries without a header
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>
If we receive data from more than one gateway, there happens to
be a mix of older and newer data (since synchronization between
gateways seems to be not working).
To deal with that, we now only accept data where the router's
system time is newer than the value stored in the DB. To account
for time synchronization issues, we also accept data which is more
than one hour older.
This patch removes other checks for old data which are now obsolete.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Adds display support for BATMAN_V data.
This is step 1 of 2. It does change the background colors for
neighbors, but does NOT change the link colors in the map.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This only works for routers with updated nodewatcher.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This only works for routers with updated nodewatcher.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Like normal router events, the block/unblock events are deleted
if they become old enough.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Increases visibility of links.
Same color change has already been performed earlier for the
neighbors in router.html.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This patch uses the absolute value for plotting and removes the
graph maximum. A dynamic upper margin is introduced to prevent
overlap of data and legend.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Since old routers send defective gateway data, some routers got
values like "false6" for quality. This is now caught and false
removed.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This affects only whether the status indication is SHOWN. It does
not affect the storage of this tag.
One can still en- or disable the blocked status of a V2 router via
the options menu.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
If a router sends his hood, it is considered to be V2.
V2 hoods are highlighted on the statistics page.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This only works for routers with updated nodewatcher.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
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>
Previously, on restart the traffic of the last period before
the restart was reused.
Now, we use the logged traffic divided by the uptime.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This shows information about WiFi parameters (e.g. channel).
Except the Tx-Power, data is only available if a firmware with
a corresponding nodewatcher update is present (version 44).
This requires a change of the MySQL table router_netif!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Since all meshing interface have different MAC adresses, the
mac itself should be unique.
This is just a change of the database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This is meant to reflect the order of the primary key.
This is just a change of the database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This is meant to reflect the order of the primary key.
This is just a change of the database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This introduces a serious of changes to code and database.
This patch requires changes to the MySQL database.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
If KeyXchange v1 routers are not shown, their popup windows are
now also disabled (as the user would expect); same for v2.
Fixes#95.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This index drastically reduces the time required for the DELETE
commands, while the other commands are not affected to strongly.
This is mainly a change to the database.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
If routers are supposed to be removed from the Monitoring
permanently, they can now be banned based on their MAC address.
All admins can do that via the web interface.
ATTENTION: This requires a database update!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
It is easier to evaluate a specific log which is not crowded with
messages from other programs
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Since other states are only evaluated correctly on a CHANGE, we
set status to 'online' for new routers, so that the second call
can log unknown events.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
The puts a router with malformatted coordinates into the default
hood.
Note:
For a comma instead of dot (lat=48,3), the Monitoring will assign
default, while the keyserver will use floor(), resulting in
lat=48.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This patch reorganizes the deletion of old stats:
- Commits are done after each step
- Netif stats deletion is split into UPDATE and DELETE
- Delays are added, to reduce locking
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>