Skip to content

Monitor: add a grace window (N snapshots or X days) before marking an entity absent #468

Description

@NotYuSheng

Summary

In the Network Monitor drift panels (Devices, IP Addresses, Protocols & Applications), an entity is greyed out (struck-through, "no longer seen") the instant it is missing from the single most recent snapshot. There is no grace period.

Consider softening this so an entity is only marked absent after it has been missing for N consecutive snapshots or X days, to avoid flapping when a device/IP/protocol is simply quiet in one capture.

Current behaviour (as of #467 / PR follow-up)

The rule is a uniform binary across all three panels — active iff present in results[results.length - 1] (the latest snapshot):

  • DeviceDriftPanellatestMacs = new Set(results[results.length-1].macs); absent = every other last-seen MAC.
  • IpDriftPanellatestIps = results[results.length-1].ips.
  • ProtocolDriftPanellatestSet = results[results.length-1].apps/protos.

All three already track each entity's last-seen snapshot (AbsentEntity.lastSeenStartTime / lastSeenFileId), so the data needed for a window rule is present.

Proposal

  • Introduce a configurable grace policy: an entity is "absent" only if its last-seen snapshot is more than N snapshots back OR more than X days old (whichever we pick — possibly both, whichever is more lenient).
  • Apply it consistently to all three panels (they share the AbsentEntity / last-seen model), not just Devices — otherwise the panels would disagree.
  • Decide defaults (e.g. N=1 preserves today's behaviour; N=3 or X=14d as a starting point) and whether it's user-configurable per network.

Notes / considerations

  • Snapshots are irregularly spaced in time, so "N snapshots" and "X days" can diverge — hence offering both.
  • The absent styling and the "Last seen in <file>" tooltip already exist; only the active/absent classification changes.
  • Out of scope for the current device-modal migration work; filing for future.

Discovered while migrating DeviceDriftPanel to the shared EntityDetailModal (PR #467 follow-up).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmonitorMonitor modeuxUser experience

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions