Skip to content

fix(clients): deleted clients stay deleted; fleet MACs purged; sane IPs - #1290

Merged
gnacho merged 1 commit into
mainfrom
fix/sticky-client-delete
Oct 6, 2026
Merged

gnacho merged 1 commit into
mainfrom
fix/sticky-client-delete

Conversation

@gnacho

@gnacho gnacho commented Oct 6, 2026

Copy link
Copy Markdown
Owner

#1278: (1) client deletes write a tombstone so cached sources stop resurrecting them; (2) fleet units' own MACs are purged from the client registry every cycle; (3) non-IP values in the ip field are dropped. Tombstones clear on re-admission via the allowlist.

#1278, three related fixes. (1) Deleting a client now writes a tombstone
(new deleted_clients table): any source that still reports the MAC
online (a cached AP station entry, a collector) no longer re-admits it,
and it disappears from the ghost list too. Re-adding the MAC through
the allowlist clears the tombstone. (2) The base MAC of every fleet
unit (routers.mac plus each agent's bridge MAC) is purged from the
registry on every cycle - the units' own management addresses were
learned as clients through the switches' FDB and lingered offline
forever. (3) Device IPs that are not parseable IPs (some sources report
a dash-formatted MAC hostname in the ip field) are dropped at ingestion
and on display.
@gnacho
gnacho merged commit 404b294 into main Oct 6, 2026
2 checks passed
gnacho added a commit that referenced this pull request Oct 13, 2026
…) (#1397)

The only client-join alert was 'unknown device', which fires only for
nameless clients after a few poll ticks (#234). A device that resolves a
hostname on the first tick (DHCP reservation, static name) was never
unknown, so a named-but-new client joined silently - no log, no push.

- noteDevicesSeen now returns the first-timers (MACs inserted into
  device_seen for the first time) that already carry a name; nameless
  ones stay with unknown-device so a new client never alerts twice.
- Startup anti-avalanche: when the table was empty on entry (first boot
  or fresh DB), the whole online set is seeded silently; later additions
  alert normally.
- trackNewClients emits a clients-category info alert, urgent so it also
  pushes, one-shot per MAC persisted in kv (new_client_alerted:) with
  the same semantics as unknown_alerted (#248). A MAC that already
  alerted as unknown does not re-alert here when it later gains a name,
  and tombstoned clients (#1278/#1290) never re-alert.
- Carries name/mac/ip/router/attachment; i18n es/en.

Tests: named first-timer alerts once with full vars, nameless stays with
unknown-device, empty-table seeding is silent but later joins alert,
unknown-alerted guard.

Closes #1323
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant