Skip to content

fix(summary): report stale only when missed ping monitoring is enabled - #982

Merged
Starosdev merged 1 commit into
betafrom
fix/965-stale-requires-missed-ping
Oct 15, 2026
Merged

Starosdev merged 1 commit into
betafrom
fix/965-stale-requires-missed-ping

Conversation

@Starosdev

Copy link
Copy Markdown
Owner

Summary

/api/summary marked every device stale for most of each day on a default install. The metrics collector runs daily (0 0 * * *) while the missed ping timeout defaults to 60 minutes. Found on the 2.0.0-beta.1 deployment on Zeus: 15 of 15 reporting devices were stale: true about 12 hours after the daily run. stale is now reported only when missed ping monitoring is enabled; last_seen is always reported.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/CD or infrastructure change

Related Issues

Related to #965. Follows #975.

Changes Made

  • annotateStaleness (webapp/backend/pkg/web/handler/get_devices_summary.go): sets stale only when metrics.notify_on_missed_ping is enabled, because that is when the operator has set a timeout that matches the collector schedule. last_seen is set whenever last-seen data exists.
  • docs/openapi.yaml and example.scrutiny.yaml describe when stale is present.
  • Auto-archive is unchanged: it is off by default and uses the larger of auto_archive_stale_days and the device timeout.

Testing

  • I have tested this locally
  • I have added/updated tests that prove my fix/feature works
  • All existing tests pass

go build ./..., go vet, go test ./webapp/backend/pkg/web/... pass; golangci-lint run --new-from-rev=origin/beta (v2.14.0, linux/amd64) 0 issues. New TestGetDevicesSummaryOmitsStaleWhenMissedPingMonitoringDisabled (default 60-minute timeout, device last seen 12 hours ago: last_seen present, stale absent); forcing stale on makes it fail. Existing stale tests now enable missed ping monitoring.

Checklist

  • My code follows the project's code style
  • I have performed a self-review of my code
  • I have commented my code where necessary (particularly complex areas)
  • I have updated the documentation if needed
  • My changes generate no new warnings

Review: required (merging publishes the :beta images with no separate deploy step)

The collector runs daily by default while the missed ping timeout defaults
to 60 minutes, so /api/summary marked every device stale for most of each
day (observed on the 2.0.0-beta.1 deployment: 15 of 15 reporting devices
stale 12 hours after the daily run). Report stale only when
metrics.notify_on_missed_ping is enabled, since that is when the operator
has set a timeout to match the collector schedule. last_seen is still
always reported.
@Starosdev Starosdev added bug Something isn't working backend Backend/Go related labels Oct 15, 2026
@Starosdev
Starosdev merged commit 0ba95a0 into beta Oct 15, 2026
20 checks passed
Starosdev pushed a commit that referenced this pull request Oct 15, 2026
## [2.0.0-beta.2](v2.0.0-beta.1...v2.0.0-beta.2) (2026-10-15)

### Bug Fixes

* **ci:** publish distinct per-image tags for prerelease versions ([35b8637](35b8637))
* **docker:** strip Debian's zfsutils-linux cron + scripts from the remaining images ([2ba3df5](2ba3df5))
* **docker:** strip Debian's zfsutils-linux cron + scripts from the remaining images ([c11e245](c11e245))
* **docker:** strip Debian's zfsutils-linux cron from the omnibus image ([b9d5130](b9d5130))
* **summary:** report stale only when missed ping monitoring is enabled ([#982](#982)) ([0ba95a0](0ba95a0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend/Go related bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant