Commit Graph

762 Commits

Author SHA1 Message Date
Adrian Schmutzler c77efa2502 router.html: Include simple debugging of step durations
This is for debugging and will be removed again.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-06 12:44:59 +02:00
Adrian Schmutzler 5249b5e24f config.py: Adjustments for 8 GiB RAM
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-06 11:32:11 +02:00
Adrian Schmutzler 5cfda32569 statictics.html: Show router models with smaller share
This also enables one decimal place for tooltips.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-06 11:30:44 +02:00
Adrian Schmutzler c72a7f1ca5 README: Add dependency and cron script call
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-04-03 17:29:04 +02:00
Adrian Schmutzler 5461a8fabd config and router.html: Increased number of stored events
Since events do not cost much, the number stored and displayed
is drastically increased.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-03-22 00:27:16 +01:00
Adrian Schmutzler c94da39798 api/alfred: Suppress duplicate key errors for stats (workaround!)
Sometimes two queries want to insert the same entry into the
router stats table, although we check for that right before the
query is made. One can suppress this by using ON DUPLICATE KEY UPDATE
to ignore the second (redundant) entry.

This is no fix, but will work until this is examined more thoroughly.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-03-15 19:09:56 +01:00
Adrian Schmutzler ca41035654 config: Reduce offline_threshold to 10 minutes
Since the gaps between alfred calls have been fixed, we can
reduce the waiting time before a router gets offline.

We now only tolerate a single missing data point, but not two
like before.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-03-15 17:34:32 +01:00
Adrian Schmutzler 79a211138f Revert "api/alfred: Suppress duplicate key errors for stats (workaround!)"
This reverts commit 3ff1117653.

Purpose: Test impact of utcnow() and router_rate_limit_list patches.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-03-15 16:47:45 +01:00
Adrian Schmutzler e992c1fd17 api/alfred: Disable router_rate_limit_list
With router_rate_limit_list, routers were not processed if the
time difference between calls was less than 5 minutes for the
same MAC address.

While this is generally not bad, there are some drawbacks:
- Not having been aware of this fact, we have established other
  mechanisms to dilute data density, which might have interfered
- With KeyXchangeV2, two gateways will send data with less than
  5 min. difference. As gateways are not connected, we know that
  we alternately receive newer and older data. With
  router_rate_limit_list, some of this data has been discarded
  before its "age" was evaluated. This caused an unwanted additional
  dilution of data which might have caused "offline" routers not
  being actually offline (for a short period)
- With KeyXchangeV1, if the second call was a little earlier, the
  a big share of the data would not be "new enough" and just be
  discarded
- With KeyXchangeV1, the same would happen for the order of records
  varying between alfred calls, were some records would have more and
  some less than 5 minutes time difference

To get rid of these issues, we remove router_rate_limit_list and
test whether the newer measures to dilute data are effective.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-03-15 16:35:59 +01:00
Adrian Schmutzler b2ebe9a007 api/alfred: Evaluate utcnow() only once for the whole alfred dataset
Since the time is used as key in MySQL, this might help to solve key
race conditions where new_router_stats is entered at the same time.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-03-15 16:30:22 +01:00
Adrian Schmutzler f9e1f91e47 api/alfred: Optimize delete queries for IPv6
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-03-15 13:36:28 +01:00
Adrian Schmutzler d90b3ea3e2 api/alfred: Use individual transactions to delete router data
This is a test patch to find out whether deadlocks can be
reduced by using smaller (but more) transactions.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-03-15 13:03:57 +01:00
Adrian Schmutzler 3ff1117653 api/alfred: Suppress duplicate key errors for stats (workaround!)
Sometimes two queries want to insert the same entry into the
router stats table, although we check for that right before the
query is made. One can suppress this by using ON DUPLICATE KEY UPDATE
to ignore the second (redundant) entry.

This is no fix, but will work until this is examined more thoroughly.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-03-15 11:46:22 +01:00
Adrian Schmutzler 657d2ecdcd Enforce https for login page link
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-03-08 23:29:48 +01:00
Adrian Schmutzler 6e9d7d1dda router.html: Add maximum value for airtime plot
This will cut defective 5 GHz data bigger than 100 %.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-03-08 23:23:56 +01:00
Adrian Schmutzler 037c60d88d config: Introduce specific stats deletion threshold for gw history
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>
2018-03-08 23:19:51 +01:00
Adrian Schmutzler 4580c46cdb api/gwinfo and scripts/deletestats: Move gw_netif deletion
Like router stats cleanup the gw_netif table is only cleaned
once a day.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-03-08 23:16:21 +01:00
Adrian Schmutzler db07af4d8a api/dnsentries: Fix missing period
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-03-05 18:48:43 +01:00
Adrian Schmutzler 987bc91034 api: Introduce dnslist and dnsentries
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>
2018-03-05 18:28:49 +01:00
Adrian Schmutzler 306681eee0 gwinfo: Delete old netif data
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>
2018-03-05 14:24:38 +01:00
Adrian Schmutzler 254236445f Realign with master
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-22 17:11:06 +01:00
Adrian Schmutzler 997e764be6 Changelog: Update
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-22 16:22:38 +01:00
Adrian Schmutzler 70c078a2ce router.html: Further adjustment of netif highlighting
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-21 20:06:22 +01:00
Adrian Schmutzler 273c246e82 api/alfred: Remove router hardname name correction for old FW
This only affects 0.5.1 and older.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-21 19:55:08 +01:00
Adrian Schmutzler f7c84fe963 router.html: Show warning if no contact address is set
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-21 17:01:07 +01:00
Adrian Schmutzler fe870ecdd5 router.html: Fix netif highlighting to allow for Nanostation
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-21 16:47:39 +01:00
Adrian Schmutzler 22dd2289bb api/alfred: Check for new router data initially by system time
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>
2018-02-14 16:43:33 +01:00
Adrian Schmutzler 247808a274 scripts/deletestats: Use block-wise delete for more stats tables
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-12 16:56:21 +01:00
Adrian Schmutzler 949df19450 router.html/map: Treat quality differently based on routing protocol
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>
2018-02-10 17:56:47 +01:00
Adrian Schmutzler 5343e0d138 api/alfred and router.html: Include routing_protocol
This only works for routers with updated nodewatcher.

This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-10 16:45:42 +01:00
Adrian Schmutzler e5e0dd84fc map: Only show coordinates on second click
First click closes open popup.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-10 16:17:11 +01:00
Adrian Schmutzler 0d31bea208 router.html: Readjust map size to System panel
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-10 15:19:53 +01:00
Adrian Schmutzler da347ec98b router.html: Show current airtime values in addition to plot
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-10 15:14:24 +01:00
Adrian Schmutzler a64b1d90fc api/alfred and router.html: Retrieve and show traffic control status
This only works for routers with updated nodewatcher.

This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-10 14:55:12 +01:00
Adrian Schmutzler 9b62b1cb13 router.html: Show gateway names in connection quality plot
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-10 13:27:49 +01:00
Adrian Schmutzler a363def019 router.html: Label netifs AFTER json if clause
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-10 13:22:32 +01:00
Adrian Schmutzler 62eab264ca router.html: Log blocked status changes to router events
Like normal router events, the block/unblock events are deleted
if they become old enough.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-10 13:18:22 +01:00
Adrian Schmutzler 977ae4f2f4 router.html: Improve interface highlighting
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-10 12:46:07 +01:00
Adrian Schmutzler 8df6699171 router.html: Add explanation and color highlighting for netifs
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-10 01:26:32 +01:00
Adrian Schmutzler 96e5ab3767 router.html: Introduce dynamic upper margin for neighbor graph
This prevents overlap of data and legend.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-07 21:26:18 +01:00
Adrian Schmutzler ee07440b6b map.js: Change blue color
Increases visibility of links.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-07 21:18:37 +01:00
Adrian Schmutzler 67885afb95 map.js: Fix babel neighbor color
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-07 21:12:22 +01:00
Adrian Schmutzler b3a3666d6b router_list.html: Make uptime sortable
Offline routers are assumed to have uptime=0.

Minor design changes included.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-07 20:54:10 +01:00
Adrian Schmutzler bf4c7ca7fe router_list.html: Show last contact
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-07 20:41:05 +01:00
Adrian Schmutzler 13ea641d3f router.html: Support babel cost and BATMAN V in neighbor graph
This patch uses the absolute value for plotting and removes the
graph maximum.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-07 20:35:22 +01:00
Adrian Schmutzler f4fab7e1c1 routertools/filters: Implement babel cost by using negative quality
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-07 20:30:57 +01:00
Adrian Schmutzler 3cc07acf87 statistics.html: Don't include orphans in gateway overview (2)
Also remove non-selected orphans.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-04 23:29:48 +01:00
Adrian Schmutzler 0c77907d92 statistics.html: Don't include orphans in gateway overview
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-04 22:12:56 +01:00
Adrian Schmutzler 1e8758ab26 routertools: Use float for neighbor and gateway quality
This enables support for BATMAN V.

This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-02-04 21:51:37 +01:00
Adrian Schmutzler 979498004a routertools: Parse gateway quality differently to catch wrong data
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>
2018-02-04 21:38:17 +01:00