Reports arriving sooner than report_min_interval_seconds (default 30) after the host's previous one are refused with 429 and a Retry-After header. The check shares the insert's transaction so concurrent requests can't bypass it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
45 lines
1.9 KiB
TOML
45 lines
1.9 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
|
|
|
|
# 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
|