Skip to content

v1.74.0 — checking the panel against real routers, a status report for management, and a site can be taken out of service

Latest

Choose a tag to compare

@maximdr86 maximdr86 released this 04 Sep 00:17
· 3 commits to main since this release

Everything since v1.73.0. Two things change numbers you already rely on, both in your favour, both described below: the dashboard counters no longer include sites that are out of service, and the "site in service" checkbox now actually works.

The stub was lying, and now we can tell

Every test in this project runs against tests/fake_router.py, which is not RouterOS but our idea of it. Where we were wrong, it is wrong in the same way, and the tests stay green. tools/reality_check.py compares what a live box returns with what the stub pretends. It only reads: print, monitor and export, enforced by a regex and a test. With --all it walks the whole fleet from the panel's own database, decrypting passwords locally and putting them neither on screen nor in the report.

The first run found four bugs that 413 tests could not see.

The Wi-Fi network name was never filled in. The registration table has no ssid field; the name lives on the interface. The stub supplied it, the panel read it from there, and on real hardware the column was always empty.

A client with an address of all zeros. Bridges create such entries, and the panel treated them as ordinary clients, so the list started with 00:00:00:00:00:00 and no name, address or vendor.

The VLAN caption was always empty. The tag and the parent interface live in /interface/vlan, and are absent from /interface/print on every one of the 47 boxes checked.

The "power on" mark never appeared. /interface/ethernet/poe/print holds settings only. The live state is in monitor, which the panel never asked for.

A faulty PoE port no longer looks like an empty one

The card marked only powered-on. A short circuit, an overload or foreign voltage on the port looked exactly like a port with nothing plugged in. For a site that is the difference between "there is no camera here" and "the camera is dead and nobody knows".

Such a port is now red. States that clear on their own, and the ordinary wait for a load, do not raise alarm. The list of states comes from MikroTik's documentation rather than from memory, which is also how we learned their separator is inconsistent: short-circuit with a hyphen, power_reset with an underscore.

A port that cannot report its link is no longer called dead. unknown means "the card does not report connection status", not "no link", and the panel was overwriting the running flag with it.

A network status report for management

A second document at /monitoring/summary, built from the same data as the technical report and offered next to it. It goes from conclusion to data rather than the other way round: a verdict in words at the top, the largest outage of the period beside it, then four numbers, then the detail. No addresses, no ports, no protocol names anywhere on the page.

Current state is kept apart from the history of the period: sites in total, unreachable now, up all period. The fourth number is duration rather than count, how many sites were down over an hour, because a two minute blink and a six hour outage are not the same thing and should not add up.

Widespread outages are told apart from coincidences. The panel looks for moments when three or more sites lost the link at once and reports when, how many and for how long. It does not claim a cause: it says several sites went dark together and that this is worth checking.

Downtime is shown for every site, not for a top five. A site missing from a short list does not read as "no downtime", it reads as "nobody mentioned it".

The carrier is visible in reports

Reports now carry the carrier as a column, as the last column in the CSV export, and as a "by carrier" section. Everything except the site count is per site: a total would grow with the number of sites, making a carrier look worse the more of them it serves.

Screenshot mode replaces carrier names the way it replaces site names, and deliberately with faceless ones. The section shows which carrier is doing worse, and a screenshot of that table with a real name is a public complaint about a named company.

A site can be taken out of service without deleting it

Equipment is removed from a site for an indefinite time, and the site keeps counting as unreachable and spoiling the fleet numbers. The mechanism existed but could not be used, for three reasons at once.

The checkbox did not work. An unchecked box is not sent by the browser at all, and the panel substituted a 1 in its place, so the site was saved back as active. Turning a site off from its card was impossible. For a new device a missing field still means active; for an existing one it now means the box was cleared.

The dashboard counters treated disabled sites like the rest. Such a site disappeared from the map and the reports at once, but stayed in "not responding" forever, because its status remains whatever the last poll saw. Now "up", "not responding" and "not checked" count only sites in service, and the ones out of service are listed separately so they are not forgotten.

The label explained the wrong thing. It said "takes part in bulk operations", which gives no hint that this is the box that stops a site from spoiling the statistics.

A site now also records when it was taken out of service, and its card explains its state instead of looking like an outage.

SSH key login

From #2: where password SSH is disabled, the terminal and the "run commands over SSH" action did not work at all. The device card now offers password or key. The key is stored encrypted, is never returned to the browser, and does not appear in the CSV export. The password is not tried as a fallback, otherwise a device where the key is actually rejected would look fine until it mattered.

The password is still needed: only SSH uses the key, and the API on 8728 logs in with a name and a password.

Faster, and it starts where you copied it

The dashboard stopped taking a second or two. Two of the attention checks filtered by time past their indexes and scanned whole log tables. Measured on a fleet of 49 sites: 148 ms and 155 ms became 3 ms and 18 ms. Two new indexes are created on an existing database at first start.

The panel starts after the folder is copied to another computer. A .venv keeps the absolute path of the interpreter it was built with, so Windows answered "Unable to create process" and Linux "bad interpreter". Both launchers now ask the environment whether it works and rebuild it when it does not, and start it through python -m uvicorn, which carries no such path.

Free space on a router is judged as a share of the disk. Two mebibytes is a failed upgrade on a board with 16 MB of flash and an ordinary day on one with 128 MB.

Upgrading

Nothing to do: the new columns and indexes are added at first start.

430 tests plus the slow ones run in CI on Python 3.10, 3.12 and 3.13.