CI / tests (Python 3.10) (pull_request) Successful in 43s
CI / tests (Python 3.11) (pull_request) Successful in 44s
CI / tests (Python 3.12) (pull_request) Successful in 43s
CI / tests (Python 3.13) (pull_request) Successful in 42s
CI / lint (pull_request) Successful in 3s
A filesystem that fills up while apt downloads or dpkg unpacks leaves the upgrade half-done and apt broken, the same failure as a full /boot but on / or /var. Nothing caught it until the host's updates stopped. The agent (0.11.0) now works out what the pending upgrades need. A simulation doesn't print apt's "Need to get" or "additional disk space" lines, so it sums the package records from apt-cache show for each version the simulation would install: Size for each .deb not already in /var/cache/apt/archives, and the growth in Installed-Size over the installed versions (from dpkg-query). Removals aren't subtracted, so it errs high. It also reports free space and the mount point of the filesystems holding /var/cache/apt/archives and /usr. The server puts a host in update when the upgrades would leave less than upgrade_min_free_mb (default 100, 0 disables) on either filesystem. The download and the install both count when they're on the same one. With nothing pending there is nothing to check, so this doesn't turn into general disk monitoring. The host page gets a "Pending upgrades size" row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
89 lines
4.1 KiB
TOML
89 lines
4.1 KiB
TOML
# /etc/kernelwatch/server.toml — every key is optional; defaults shown.
|
|
|
|
# The server speaks plain HTTP; keep it on loopback behind a TLS reverse proxy.
|
|
listen_host = "127.0.0.1"
|
|
listen_port = 8080
|
|
db_path = "/var/lib/kernelwatch/kernelwatch.db"
|
|
|
|
# A host that hasn't reported in this long shows as "stale".
|
|
# Agents report hourly (plus up to 15 min jitter).
|
|
stale_after_hours = 3.0
|
|
|
|
# Package lists older than this mean "no updates" can't be trusted.
|
|
apt_stale_after_hours = 48.0
|
|
|
|
report_retention_days = 30
|
|
|
|
# Less free space than this (MB) on the filesystem holding /boot puts a host in
|
|
# "update": the next kernel's image and initramfs may not fit, and its install
|
|
# fails half-way. 0 disables.
|
|
boot_min_free_mb = 200
|
|
|
|
# Pending upgrades that would leave less free space than this (MB) where apt
|
|
# downloads them (/var/cache/apt/archives) or installs them (/usr) put a host in
|
|
# "update": dpkg could run out of room half-way. 0 disables.
|
|
upgrade_min_free_mb = 100
|
|
|
|
# A host whose OS release no longer gets security updates (Debian past LTS, Ubuntu
|
|
# past standard support without ESM) is in "update". This many days before that,
|
|
# its row gets a note. 0 disables the note.
|
|
os_eol_warn_days = 90
|
|
|
|
# On hosts with unattended-upgrades enabled (it runs daily), no successful run in
|
|
# this many days puts the host in "update". Hosts without it aren't affected.
|
|
# 0 disables the check.
|
|
unattended_upgrades_stale_after_days = 3.0
|
|
|
|
# A host with no repository for its release's security suite (trixie-security,
|
|
# noble-security) in apt's lists is in "update", and so is one whose copy is older
|
|
# than this many days while its other lists refresh (fetching it is failing).
|
|
# Both suites publish at least daily. 0 disables the check.
|
|
security_repo_stale_after_days = 7.0
|
|
|
|
# kernelwatch-backup.timer writes a dated copy of the database here every night
|
|
# and deletes copies this many days old or older (0 keeps them all). Keep the
|
|
# directory under /var/lib/kernelwatch; the unit can't write elsewhere. Copy the
|
|
# files off this machine yourself: they don't protect against losing it.
|
|
# A failed backup run sends an ntfy message (if ntfy_url is set).
|
|
backup_dir = "/var/lib/kernelwatch/backups"
|
|
backup_keep_days = 7
|
|
|
|
# Refuse (HTTP 429) a report that arrives sooner than this after the host's
|
|
# previous one. Agents report hourly; this only stops a stuck or abusive client
|
|
# from flooding the history. 0 disables.
|
|
report_min_interval_seconds = 30
|
|
session_hours = 12
|
|
|
|
# Session cookie gets the Secure flag. Leave on unless you're testing over
|
|
# plain HTTP on something other than localhost.
|
|
secure_cookies = true
|
|
|
|
# Behind a reverse proxy, use X-Forwarded-For / X-Forwarded-Host for login
|
|
# rate limiting and origin checks. Only enable if the port isn't reachable
|
|
# directly, or clients can spoof their IP.
|
|
trust_proxy_headers = false
|
|
|
|
# Stale-host and reporting-recovery notifications. Empty URL disables alerts.
|
|
# The server installer enables a timer that checks every five minutes.
|
|
# This uses stale_after_hours above (3h allows for hourly reports + 15m jitter).
|
|
# Include the topic in the URL; use a topic you subscribe to in your ntfy app.
|
|
ntfy_url = "" # e.g. "https://ntfy.example.com/kernelwatch"
|
|
ntfy_token = "" # optional ntfy access token (Bearer auth)
|
|
ntfy_timeout_seconds = 10.0
|
|
|
|
# Also notify (once) when a host has needed a reboot or updates for this long.
|
|
# Measured from when the host entered that state, not from its latest report.
|
|
# Reaching a worse state (updates -> reboot) notifies again after another period.
|
|
# 0 disables. Needs ntfy_url.
|
|
status_alert_after_hours = 24.0
|
|
|
|
# Also notify (once per problem) when Ubuntu Livepatch has been unhealthy, or a host
|
|
# that used to report it has stopped, for this long. 0 disables. Needs ntfy_url.
|
|
livepatch_alert_after_hours = 6.0
|
|
|
|
# Dead-man's switch: an external monitor (e.g. healthchecks.io) that alerts when the
|
|
# pings STOP, which is how you learn kernelwatch itself isn't running. Treat these
|
|
# URLs like passwords. Empty disables.
|
|
heartbeat_url = "" # pinged every five minutes by the alert check
|
|
backup_heartbeat_url = "" # pinged after each successful nightly backup
|