From 4b5dcae2add9bd7a141a5062756789a05f9cada6 Mon Sep 17 00:00:00 2001 From: patrickbeane Date: Fri, 30 Oct 2026 12:10:45 -0400 Subject: [PATCH] Add a one-line summary to each docs page and tidy the development page Co-Authored-By: Claude Sonnet 5.5 --- docs/agents.md | 2 ++ docs/alerts.md | 2 ++ docs/development.md | 10 +++++++++- docs/how-it-works.md | 2 ++ docs/operations.md | 2 ++ docs/reverse-proxy.md | 2 ++ docs/security.md | 2 ++ docs/server.md | 2 ++ 8 files changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/agents.md b/docs/agents.md index a49b505..f85721a 100644 --- a/docs/agents.md +++ b/docs/agents.md @@ -2,6 +2,8 @@ [← kernelwatch](../README.md) +Installing the agent on hosts, one at a time or across the whole fleet. + ## Adding a host On the server: diff --git a/docs/alerts.md b/docs/alerts.md index bd97a70..0896a25 100644 --- a/docs/alerts.md +++ b/docs/alerts.md @@ -2,6 +2,8 @@ [← kernelwatch](../README.md) +ntfy notifications for stale hosts, pending reboots and updates, plus heartbeat monitoring so you find out if kernelwatch itself stops. + ## Stale-host, reboot and update alerts (ntfy) The server can notify an [ntfy](https://ntfy.sh/) topic when a host stops diff --git a/docs/development.md b/docs/development.md index f9bec81..e668761 100644 --- a/docs/development.md +++ b/docs/development.md @@ -2,6 +2,8 @@ [← kernelwatch](../README.md) +Running the tests and a local server. + ```sh make test # unit + integration tests (stdlib unittest) make lint # shellcheck, if available @@ -15,11 +17,15 @@ The tests run a real server on an ephemeral port. They also run the real agent script against stubbed `dpkg-query`/`apt-get`/`needrestart`/`uname` and a fake filesystem root (`KERNELWATCH_ROOT`), including one end-to-end agent → server report. + Both installers (`agent/install.sh`, `server/install.sh`) run for real in the tests against a fake root: `KERNELWATCH_ROOT` prefixes every path they write and skips their root check, and `systemctl`, `apt-get`, `useradd` and the like are stubs that log their arguments. Don't set it on a real host. +`tests/test_docs.py` checks that every relative link and `#anchor` in the README +and `docs/` resolves, so move or rename a heading and it tells you what broke. + Run a local server against a scratch database: ```sh @@ -32,5 +38,7 @@ export KERNELWATCH_CONFIG=/tmp/kw.toml ## Ideas for later - Additional notification channels -- A JSON endpoint for scripting +- An HTTP endpoint for `kernelwatch status`, behind a hashed API token and your + proxy's IP allow-list, if something has to poll remotely (the CLI already + covers scripting on the dashboard host) - Grouping or tagging hosts (prod/staging, location) diff --git a/docs/how-it-works.md b/docs/how-it-works.md index 887ff20..edbff1f 100644 --- a/docs/how-it-works.md +++ b/docs/how-it-works.md @@ -2,6 +2,8 @@ [← kernelwatch](../README.md) +How each host's status is decided, and how the agent collects the facts behind it. + Each host gets one status. When several apply, the worst one wins: | Status | Meaning | diff --git a/docs/operations.md b/docs/operations.md index 19b00aa..09ddafd 100644 --- a/docs/operations.md +++ b/docs/operations.md @@ -2,6 +2,8 @@ [← kernelwatch](../README.md) +Day-to-day tasks: querying the fleet from a script, and backing up the database. + ## Scripting: `kernelwatch status` `kernelwatch status` prints the fleet the way the dashboard shows it, from the diff --git a/docs/reverse-proxy.md b/docs/reverse-proxy.md index 637484e..3d9207d 100644 --- a/docs/reverse-proxy.md +++ b/docs/reverse-proxy.md @@ -2,6 +2,8 @@ [← kernelwatch](../README.md) +How to put TLS, and optionally extra access control, in front of the server. + ## TLS reverse proxy The server speaks plain HTTP on `127.0.0.1:8080`. Put a TLS proxy in front of it. diff --git a/docs/security.md b/docs/security.md index f2dc070..efe27c0 100644 --- a/docs/security.md +++ b/docs/security.md @@ -2,6 +2,8 @@ [← kernelwatch](../README.md) +How kernelwatch is locked down, and what it deliberately can't do. + - **Host identity comes from the token, not the payload.** A host can only report as itself. Tokens are 256-bit random values; only their SHA-256 is stored. - **Report rate limit.** A report arriving less than `report_min_interval_seconds` diff --git a/docs/server.md b/docs/server.md index a562a7a..dc185a8 100644 --- a/docs/server.md +++ b/docs/server.md @@ -2,6 +2,8 @@ [← kernelwatch](../README.md) +Installing and upgrading the dashboard server, and the admin commands. + ## Install and upgrade On the dashboard host: