summaryrefslogtreecommitdiff
path: root/internal/cli/cmd_daemon.go
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 /internal/cli/cmd_daemon.go
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 'internal/cli/cmd_daemon.go')
-rw-r--r--internal/cli/cmd_daemon.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/cli/cmd_daemon.go b/internal/cli/cmd_daemon.go
index 111968f..00071cf 100644
--- a/internal/cli/cmd_daemon.go
+++ b/internal/cli/cmd_daemon.go
@@ -24,8 +24,7 @@ func runDaemon(args []string) error {
fs.SetOutput(os.Stdout)
statsDir := fs.String("stats-dir", os.Getenv("GOPRECORDS_STATS_DIR"), "Uptimed stats directory (required; env GOPRECORDS_STATS_DIR)")
listen := fs.String("listen", defaultListenFromEnv(), "TCP listen address (env GOPRECORDS_LISTEN, default :8080)")
- authDB := fs.String("auth-db", "", "SQLite file for upload API keys (default: <stats-dir>/goprecords-auth.db)")
- db := fs.String("db", os.Getenv("GOPRECORDS_DB"), "SQLite database path for excluded hosts used by /metrics (env GOPRECORDS_DB)")
+ authDB := fs.String("auth-db", "", "SQLite file for upload API keys and excluded hosts (default: <stats-dir>/goprecords-auth.db)")
if err := fs.Parse(args); err != nil {
return err
}
@@ -36,7 +35,7 @@ func runDaemon(args []string) error {
}
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
- err := daemon.Run(ctx, daemon.Config{StatsDir: *statsDir, Addr: *listen, AuthDB: *authDB, DB: *db})
+ err := daemon.Run(ctx, daemon.Config{StatsDir: *statsDir, Addr: *listen, AuthDB: *authDB})
if err != nil && !errors.Is(err, context.Canceled) {
return err
}