summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-16 10:22:48 +0300
committerPaul Buetow <paul@buetow.org>2026-04-16 10:22:48 +0300
commit4371aa94b0793c70a3e146fad6398f0dcb540048 (patch)
treec7a4e1fd6726927d3344dace8d38cda7efef706d /README.md
parentee8221e6c88640dba31c69c59c19e65a8dc54a3e (diff)
Release 0.5.1: auto-unexclude, merge excluded_host into auth DB0.5.1
- /metrics: auto-remove exclusion when records mtime > excluded_at so hosts that resume uploading unexclude themselves on next scrape - Consolidate excluded_host table into the auth DB (goprecords-auth.db) instead of a separate file — removes -db daemon flag and GOPRECORDS_DB env - README: add host exclusion section with kubectl exec examples Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/README.md b/README.md
index da7e44e..aed7826 100644
--- a/README.md
+++ b/README.md
@@ -252,6 +252,43 @@ sudo loginctl enable-linger "$USER"
If there are **no** keys in the auth database, uploads are accepted without **`Authorization`** (useful for local testing only).
+### Excluding hosts from /metrics alerts
+
+Hosts that no longer send updates can be marked as excluded so Prometheus
+alert rules can filter them out. Excluded hosts still appear in `/metrics`
+with `excluded="true"`.
+
+**Exclude a host**
+
+```bash
+# daemon on Kubernetes — auth DB lives on the stats PVC
+kubectl exec -n services deployment/goprecords -- \
+ goprecords exclude -db=/data/stats/goprecords-auth.db -reason="decommissioned" myhost
+
+# local daemon
+goprecords exclude -db=/var/lib/goprecords/goprecords-auth.db -reason="decommissioned" myhost
+```
+
+**List excluded hosts**
+
+```bash
+kubectl exec -n services deployment/goprecords -- \
+ goprecords list-excluded -db=/data/stats/goprecords-auth.db
+```
+
+**Remove an exclusion manually**
+
+```bash
+kubectl exec -n services deployment/goprecords -- \
+ goprecords unexclude -db=/data/stats/goprecords-auth.db myhost
+```
+
+**Auto-unexclude**
+
+When a host resumes sending uploads its records file mtime becomes newer than
+`excluded_at`. On the next `/metrics` scrape the daemon detects this and
+automatically removes the exclusion — no manual intervention needed.
+
### Manual upload client (all operating systems)
The unified script **`scripts/goprecords-upload-client.sh`** works on