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>
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 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>
With this patch, router stats are only deleted if the router
is online or missing in the router table.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This restores the behavior before the MySQL conversion: If a
router is reset, the new (empty) values are not written to
the variables, instead the old ones are kept.
In contrast to the old setting, however, we still do reset the
hood.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Since we do not use MongoDB anymore, the structure of the parsed
data in router_update can be simplified to a less nested scheme.
In addition to that, directory keys have been adjusted to those
in MySQL. This prevents typos and errors.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Since exceptions during parsing a router's alfred data are
caught, you do not learn about the reasons.
Thus, this writes some information to a file.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
After 7 days of being offline, a router enters the orphaned
state with a grey icon. It is only deleted after a longer period
of 180 days.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
If the default is NULL (as previously), we have ugly problems
with indexing and queries. To circumvent this, the hood is
set to "Default" right at the beginning.
For old data, we add an if to the hood stats calculation.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>