Repository navigation
Conversation
… loss (#95) agent#336 puts two cumulative counters on the health beacon: ring_dropped, the events the Linux eBPF probes lost to a full ring buffer over every ring, and exec_ring_dropped, the part of it lost from the exec ring (process starts the rules never saw). The non-strict beacon parse stripped both, so a host whose sensor dropped about 1,000 file_open events every 10 s (agent#334) looked healthy in the console. Both are parsed as counter.default(0), stored as BIGINT columns, and shown on the ops page as "eBPF events lost". ring_dropped joins LOSS_COUNTERS, so a rise stamps lossObservedAt and degrades the host; exec_ring_dropped is part of it and needs no entry of its own. storeBeacon and loadFleet crossed max-lines-per-function with the new fields, so their beacon-to-column and row-to-view mappings move into storedCounters and healthView. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: sofrexs <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #95.
Why
agent#336 puts two cumulative counters on the health beacon:
ring_dropped(events the Linux eBPF probes lost to a full ring buffer, over every ring) andexec_ring_dropped(the part lost from the exec ring: process starts the rules never saw).HealthBeaconis a non-strictz.object, so the server stripped both, and a host whose sensor lost about 1,000file_openevents every 10 s (agent#334) looked healthy in the console.Change
lib/health-beacon.ts: both parsed ascounter.default(0), like theetw_*counters. Absent from an older agent: zero.prisma/schema.prisma: twoBIGINTcolumns,ring_droppedandexec_ring_dropped, next to the other loss counters. Only the totals: the per-ring breakdown stays in the agent log.lib/fleet-health.ts:ring_droppedjoinsLOSS_COUNTERS, so a rise stampslossObservedAtand a fall (agent restart) does not.exec_ring_droppedis part of it, so it never rises alone and needs no entry. NewringLossSummaryfor the cell:none,1000, or1000 (3 process starts).lib/fleet.ts/ ops page: aringLossview and an "eBPF events lost" column.storeBeaconandloadFleetcrossedmax-lines-per-function, so their mappings move intostoredCountersandhealthView. The lint count stays at the 113 ceiling.Tests
ringLossSummary,loadFleetmapping.prisma generate,tsc --noEmitclean,npm run lint0 errors / 113 warnings,vitest run tests/unit1484 passed.Overlaps #94 (counter saturation at
BIGINT) only by both touchinglib/health-beacon.tsin different spots.🤖 Generated with Claude Code