diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-16 08:47:11 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-16 08:47:11 +0300 |
| commit | 442236f8515e761c1bd97f2cf3fd6b102bdecb64 (patch) | |
| tree | dbeb4f48688f7d5bec72f858b2c4fafc1b2fa96d /internal/daemon/upload_test.go | |
| parent | edeffd05dc62c4c3d747cc41067bf4e1814f300a (diff) | |
Add /metrics Prometheus endpoint to daemon mode
Exposes a gauge per host tracking the Unix timestamp of the last records
file update. Excluded hosts (from the excluded_host table) are labeled
excluded="true" so alerting rules can filter them out. Uses manual
Prometheus text format to avoid adding a new dependency.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/daemon/upload_test.go')
| -rw-r--r-- | internal/daemon/upload_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/daemon/upload_test.go b/internal/daemon/upload_test.go index 2cc52f3..761fd62 100644 --- a/internal/daemon/upload_test.go +++ b/internal/daemon/upload_test.go @@ -207,7 +207,7 @@ func TestUploadAuthBearerNegativeTable(t *testing.T) { if _, err := store.CreateKey(ctx, "myhost"); err != nil { t.Fatal(err) } - srv := httptest.NewServer(routes(statsDir, "", store)) + srv := httptest.NewServer(routes(statsDir, "", "", store)) defer srv.Close() url := srv.URL + "/upload/myhost/txt" tests := []struct { |
