Commit graph

16 commits

Author SHA1 Message Date
neil
462525b1e2 Health: split the live matrix into Local (probe to probe) and Internet tables
Local is a square probe-by-probe matrix with a self diagonal. Internet holds
the gateway, LAN and public DNS, web checks and the VPS per probe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 20:28:24 -08:00
neil
03604c8367 macOS: wait for the old launchd job before reloading the daemon
Re-running the installer on a Mac failed with "Bootstrap failed: 5:
Input/output error". bootout returns while the old job is still stopping,
and the bootstrap right after it fails. setup.sh now lints the plist, waits
until launchctl print no longer finds the job, re-enables it (a disabled job
also fails with error 5), retries the bootstrap once, and names the commands
to check if it still fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 20:18:43 -08:00
neil
380243545c macOS: run the launchd daemon as root so it can reach the LAN
On macOS 15, Local Network privacy blocks LAN connections from a launchd
daemon running as a user (EHOSTUNREACH; curl works), and a daemon can't show
the permission prompt. Tested on 15.3.1 with the probe's own Python: a root
daemon connects to the hub, the same daemon with UserName gets "No route to
host". The plist no longer sets UserName. The checkout, venv and
<name>-update stay owned by the installing user.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 20:15:43 -08:00
neil
30ce39d5f0 Fix Copy on plain-http hubs, toasts under modal backdrops, shorter install dialog
- copyText (house ui.js): over plain http (a LAN IP or .local name) there is
  no navigator.clipboard, and the fallback copied an empty string. el() set
  the textarea's value as an attribute, which textareas ignore. The textarea
  also sat outside the open modal, where it can't be selected. The fallback
  now sets .value, works inside the dialog, and reports a failure instead of
  always toasting success.
- toast (house ui.js): goes inside an open modal dialog, above its backdrop,
  which dimmed it to gray on gray in both themes.
- Install dialog: one sentence that holds on any machine, plus the hub address
  and a link to the install notes; the command is select-all on click.

The same ui.js fix is in the web-frontend skill's house assets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 19:42:00 -08:00
neil
35459b6309 Use the full path for the update command under pct exec
pct exec runs commands with a minimal PATH that lacks /usr/local/bin, so
"pct exec <ctid> -- network-monitor-update" failed with "No such file".
The installer summary, README and CLAUDE.md now give
/usr/local/bin/<name>-update. The in-container summary and the Settings
page no longer suggest sudo where there is none (as root in an LXC).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 19:34:51 -08:00
neil
cb092f2333 Fix the Probes page failing to load; add a JS syntax check
An apostrophe in "aren't" ended a single-quoted string in views/probes.js,
so the module failed to parse ("missing ) after argument list") and the
Probes page couldn't load. Use the typographic apostrophe like the rest of
the UI copy.

scripts/check-js.sh parses every frontend module as an ES module (node in a
container if the host has none). Plain node --check on a .js file accepted
the broken file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 19:32:34 -08:00
neil
cd2deda996 LXC installs: announce <hostname>.local with Avahi, hub on port 80
In an LXC (lxc mode on a Proxmox node, or native mode inside an LXC), the
installer now:
- installs avahi-daemon (with the rlimit-nproc fix for unprivileged
  containers), so the container answers at <hostname>.local, and lists the
  web UI as a _http._tcp service
- serves the hub on port 80 (CAP_NET_BIND_SERVICE for the netmon user) unless
  HOST_PORT is given, so http://netmon-hub.local works without a port
- runs the inner install with LANG/LC_ALL=C.UTF-8 (no locale warnings from
  the node's LANG) and prints one summary, with the .local address

When the UI is opened by a .local name, the Add probe command uses the hub's
own IP for HUB_URL, since Linux probes usually can't resolve .local.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 19:19:47 -08:00
neil
a96ae4e825 Proxmox: stop early when the node's cluster has no quorum
Without quorum /etc/pve is read-only, so pct create and pvesm set fail with
cfs lock errors. lxc mode now checks pvecm status first and explains the
fixes (pvecm expected 1 for now, or separating the node from the cluster).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 18:44:41 -08:00
neil
310f78c7df CLAUDE.md: drop the node-specific storage note
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 18:41:57 -08:00
neil
91e5b7096e CLAUDE.md: note gmktec-g9 storage findings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 18:38:46 -08:00
neil
fbe1a1be43 Proxmox: explain why no container storage qualifies; pick storage before the template
On a cluster node whose container storages are all disabled for that node,
the installer said only "no active storage". It now lists the storages that
allow containers with their status on this node, explains "disabled", and
gives the two fixes. Storage is checked before any template download, so a
failed run leaves nothing behind. Also drops --enabled from the pvesm query
so disabled storages show in that listing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 18:38:38 -08:00
neil
1dad1ad85d Fix the Proxmox installer test under verify.sh
The test container runs pytest as a non-root user with /tmp mounted noexec,
so stub scripts written there couldn't run. Stub pct, pveam, pvesm, pvesh,
sleep and id as exported bash functions instead, acting as root on the node
whoever runs the tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 18:31:48 -08:00
neil
a17f2b502c Proxmox nodes: install in an LXC container instead of Docker on the node
Run on a Proxmox VE node (pct and /etc/pve present), the installers now
default to INSTALL_MODE=lxc: create or reuse (by tag netmon-hub /
netmon-probe) an unprivileged Debian LXC on vmbr0 with nesting and onboot,
push the installer into it (rebuilt from its own functions) and run it there
in native mode. LXC_* variables override ID, storage, template storage,
bridge, IP and size. Docker on a node now needs an explicit
INSTALL_MODE=docker and prints a warning; an earlier Docker install is
pointed out with removal steps.

Ping setup inside an unprivileged container stays within the mapped group
range, which the kernel requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 18:28:21 -08:00
neil
edeb77f833 Docs: repo is public; simplify install commands
The raw installer URL is confirmed (200, matches main) and anonymous clone
works, so installs need no token. Private-repo steps move to a fallback note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 18:16:12 -08:00
neil
efd3836945 Serve installers from the hub; document the private-repo install
The repo is private, so anonymous raw URLs return 404. The hub now serves
/install-probe.sh (and /install.sh) from its own checkout, open even with
UI_PASSWORD, and the Add probe command fetches from there. The installers
still ask for a read-only token to clone. Docs use Gitea's
"Authorization: token" header and give a git-clone fallback for the hub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 18:13:19 -08:00
neil
54a765510a Network monitor: hub, probes, Docker and native installers
Hub (FastAPI + no-build web UI):
- Network health: live probe/target matrix, status strips, incidents
- Probes: add (with install command), rename, remove, latency and throughput charts
- Clients merged from AdGuard, DHCP, query log and probe ARP tables; names,
  categories, suspicious flag, notes, per-client DNS requests
- Query log, domain detail (clients, related subdomains), blocked domains via
  the AdGuard Home /control API

Probe: tests peers (ping, HTTP, throughput), gateway, LAN and public DNS,
internet URLs and an optional VPS; buffers results while the hub is down.
Gateway and ARP from /proc/net on Linux, route/arp on macOS.

Install: install.sh (hub) and install-probe.sh (generated from it), each in
docker mode (compose; default on Linux hosts) or native mode (venv + systemd
or launchd; default on macOS and in LXC). Both modes deploy with an update
command that checks the new commit and rolls back on failure.

CLAUDE.md carries shared context for Claude Code sessions on each machine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 18:10:29 -08:00