Commit Graph

590 Commits

Author SHA1 Message Date
Adrian Schmutzler 3ee01379dd router.html: Fix display of WebUI and remove try/catch
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:51 +01:00
Adrian Schmutzler f14e9a51be statistics.html: Fix order in hoods table
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:51 +01:00
Adrian Schmutzler 80d6a421e5 router.html: Show hood version next to hood name
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:50 +01:00
Adrian Schmutzler 0bf2312fe4 Global: Put hoods into table and use smallint for reference
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>
2018-11-23 13:14:50 +01:00
Adrian Schmutzler dd6d101ccd Global: Identify local routers and indicate their status
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>
2018-11-23 13:14:50 +01:00
Adrian Schmutzler b38af9a74b Global: Read V1 hoods from KeyXchange
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>
2018-11-23 13:14:50 +01:00
Adrian Schmutzler 77bd43c73a Global: Add V2 hoods to table
This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:50 +01:00
Adrian Schmutzler 74ba799912 alfred/gwinfo: Provide specific error message if JSON non-parsable
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:50 +01:00
Adrian Schmutzler c1c728f2a3 Global: Convert IPv4/IPv6 from char to numbers/binary
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>
2018-11-23 13:14:50 +01:00
Adrian Schmutzler bc3460f2e0 Global: Change MAC address storage to use BIGINT
This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:41 +01:00
Adrian Schmutzler 2a7d58413d gwinfo: Fix greps for IPv4/IPv6/dnsmasq (v1.4.1)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:43:49 +01:00
Adrian Schmutzler ea7f0ed199 map: Show hood borders in different colors
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:41:46 +01:00
Adrian Schmutzler 9ea489da74 map: Fix capitalization of hood names
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>
2018-11-22 18:41:09 +01:00
Adrian Schmutzler e7d68398e2 statistics.html: Remove trailing whitespace
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:40:20 +01:00
Adrian Schmutzler 478c0fb8dd gwinfo: Support internal IPv4/IPv6 and DHCP ranges (v1.4)
This updates gwinfo script AND evaluation code.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:37:30 +01:00
Adrian Schmutzler fe4136167a sendgwinfo: Multi-URL, https and default batctl (v1.3)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:35:52 +01:00
Adrian Schmutzler 24c64f5605 graph.js: Enable additional parameters for plots
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>
2018-11-22 18:33:58 +01:00
Adrian Schmutzler 49cb6673d7 router.html: Rephrase option to report router
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:32:28 +01:00
Adrian Schmutzler ef3b4d78fa config.py: Decreased netif stats to 10 days
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:31:57 +01:00
Adrian Schmutzler 05fda04ccd user_list: Fix not counting router for mixed-case mail adresses
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:31:44 +01:00
Adrian Schmutzler d3c8a7a64d uwsgi: Suppress logging every request
Errors (Status 4xx/5xx) will still be logged.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:30:58 +01:00
Adrian Schmutzler 4bfe42bb67 map: Indicate WAN uplink with white center in dots
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-22 18:30:22 +01:00
Adrian Schmutzler 79bada38bb Changelog: Update
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:11:07 +02:00
Adrian Schmutzler d779b10778 config.py: Use dedicated folder for log files
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:16 +02:00
Adrian Schmutzler e46380eb50 config.py: Wait 15 minutes before offline status
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:16 +02:00
Adrian Schmutzler c7ebe21caa config.py: Adjust gw stats collection (only 1 day)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:16 +02:00
Adrian Schmutzler 7a03e43c3b config.py: Adjust netif stats collection (14 days every 5 min)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:16 +02:00
Adrian Schmutzler 339eaee9a5 scripts: Redirect cron output to log only
This prevents information sent via e-mail.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:15 +02:00
Adrian Schmutzler cf3517d9d2 api/alfred: Fix check for existing router and delete fragments
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>
2018-07-03 14:10:15 +02:00
Adrian Schmutzler 6d492a3a25 api/alfred: Support Babel neighbor IP address inside tag
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:15 +02:00
Adrian Schmutzler c01a3017a2 api/alfred: Support loadavg5
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:15 +02:00
Dominik Heidler 22df21dc7e router.html: Improve readability of selected mesh network devs
Signed-off-by: Dominik Heidler <dominik@heidler.eu>
2018-07-03 14:10:15 +02:00
Adrian Schmutzler 323a3a000c api/alfred: Improve retrieval of L3 mac address from IPv6
Thanks to Fabian Blaese.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:15 +02:00
Adrian Schmutzler b1eacf5f0a maptools: Always use "best" connection for link color
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>
2018-07-03 14:10:15 +02:00
Adrian Schmutzler c155dbef6e map/router.html: Show neighbor links in black
This improves contrast to the background

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 14:10:08 +02:00
Adrian Schmutzler 166cad518a map/router.html: Indicate ethernet mesh connections by color
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 13:49:41 +02:00
Adrian Schmutzler 3034fd9e2c maptools: Treat case of multiple neighbor interfaces correctly
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 13:46:30 +02:00
Adrian Schmutzler f6e9aec960 init_db: Add missing gw tables
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 13:45:40 +02:00
Adrian Schmutzler aa99035e23 statistics.html: Show aggregated traffic for hoods and total
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>
2018-07-03 13:45:40 +02:00
Adrian Schmutzler b21b6c9201 router.html: Display Gateway
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-03 13:45:37 +02:00
Adrian Schmutzler 5e60c70ca5 api/alfred: Introduce gateway field
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>
2018-07-03 13:45:29 +02:00
Adrian Schmutzler 092a94500b Changelog: Update
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-16 13:23:32 +02:00
Adrian Schmutzler eeac779589 router.html: Three columns for legend in neighbor plot
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-16 13:21:51 +02:00
Adrian Schmutzler b6b1b801fe router.html: Label historic neighbors in plot with "(old)"
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-16 13:21:42 +02:00
Adrian Schmutzler 6a85c59ce6 router.html: Display name for all neighbors (including "historic")
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>
2018-04-16 13:21:32 +02:00
Adrian Schmutzler 54764f7f43 router.html: Show former neighbors in neighbor stats plot
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>
2018-04-16 13:18:22 +02:00
Adrian Schmutzler 7955e60f2f scripts: Add scripts to defragment MySQL tables
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>
2018-04-16 13:12:47 +02:00
Adrian Schmutzler fc9a494078 routertools: Also delete from router_gw and router_stats_gw
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-16 13:12:39 +02:00
Adrian Schmutzler a20a473bb4 graph.js: Move reset button to the bottom left
This prevents overlay with large legends.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-16 13:12:10 +02:00
Adrian Schmutzler af2e2591b9 statistics.html: Show "models per client" pie chart
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-16 13:12:03 +02:00