This will reduce size of stats_hood and, more importantly,
make hood assignment independent of hood name changes:
Previouly: Name change = changing string in every place
Now: Name change = change of one table entry
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This detects local routers based on knowing their hood, but not
having the hood listed in hoodsv2 table.
This classification is performed when the routers' alfred data
is parsed. Thus, offline routers won't change.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This obsoletes the hood initialization file.
Hood are capitalized and "V1" is added at the end.
This may require a rename of the existing hood stats.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This is done for tables router_ipv6 and router_netif.
This is not done for table gw_netif (contains subnet masks).
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Previously, hood names were reformatted to have only the first
letter capitalized. Now, we just take the names as they are.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This makes the applications of the affected plots more versatile
and thus reduces the need for duplicate code.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
The router id "router_id" is only evaluated based on the
router_netif table. If the corresponding entry in the router
table is missing, an error occurs.
To deal with that, we now use the "olddata" variable for ifs,
which is initialized based on the router table. If nothing is
found there, we trigger delete_router to get rid of fragments
in other tables.
The latter is necessary, as we identify routers by MAC addresses
and thus old entries will keep to be a problem if just a new
entry is added to router_netif.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This is much easier to maintain and prevents from having a
wrong average if e.g. w2mesh and w5mesh are present, but only
the better one is used.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This patch aims at showing the client-caused traffic. We use
bat0 for this, at this seems to be the easiest way which does not
require router-specific ifs etc.
This patch distinguishes between routers and gateways:
- For routers, we just use the bat0 data
- For gateways, we aggregate eth0.1, eth1.1, w2ap and w5ap
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This introduced a boolean gateway field, which is set based on
the gateway connections sent via alfred.
If a device provides no gateways which it is connected to, it is
assumed to respresent a gateway.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This change the behavior concerning the displayed netif name in
the legend of the neighbor stats plot. Previously, the netif name
of the device was shown, now we show the netif name corresponding
to the neighbor. This is necessary, as we do not log netif names
for neighbors.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
If a router is currently not connected as neighbor, we don't see
its history. This patch shows all current and former neighbors.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
scripts/defragtables.py:
- If run without argument, all tables EXCEPT stats are defragmented
(quick run)
- If run with argument e.g. "1", all table INCLUDING stats are
defragmented (will take about one hour)
scripts/defragtable.py <space-separated list of tables>:
- Defragments the specified tables; will crash if table does not
exist
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>