Add true RSS reporting to dashboards#94
Merged
chrisbliss18 merged 1 commit intov2from Apr 30, 2026
Merged
Conversation
Add a shared processmetrics helper that reads Linux procfs resident pages, while keeping Go runtime Sys and heap allocation available as separate metrics. The host dashboard, fleet process-health snapshots, fleet JSON payloads, and fleet table now expose RSS alongside Go Sys memory instead of forcing operators to infer host memory from runtime allocator data. Extend jetmon_process_health with rss_mem_mb and preserve go_sys_mem_mb for the runtime guardrail signal. Monitor and deliverer snapshots now publish both fields, and StatsD process.rss_mb again reports resident memory when procfs is available while process.go_sys_mem_mb keeps the old runtime view visible. Update dashboard, rollout, architecture, and operations docs to explain how operators should use RSS versus Go Sys memory during rollout and memory-pressure investigations.
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.
Summary
This closes out the dashboard memory reporting work by adding true process RSS alongside the existing Go runtime memory signal.
The host and fleet dashboards now expose both values so operators can compare Jetmon with host-level tools like
ps,top, and systemd while still keeping Go Sys memory visible for runtime guardrails and pprof investigations.What changed
internal/processmetricshelper for local process memory sampling.rss_mem_mbtojetmon_process_healthvia migration 26.jetmon2andjetmon-delivererprocess-health snapshots./api/state,/api/host,/api/fleet, the host dashboard, and the fleet dashboard to expose RSS beside Go Sys memory.process.rss_mbreports resident memory when procfs is available, with additiveprocess.go_sys_mem_mbfor the runtime allocator view.Example dashboard values
Host dashboard throughput section now shows memory as two separate cards:
Fleet process rows now show both values in the memory column:
The JSON payload exposes both fields for machine parsing:
{ "go_sys_mem_mb": 24, "rss_mem_mb": 37 }Review notes
I reviewed the branch from sysadmin, security, and code-quality perspectives after the initial implementation.
/proc/self/statm; there is no user-controlled path in production code and no additional remote surface beyond the existing internal dashboards and APIs.CurrentMemory()helper, and tests assert the exact JSON and StatsD fields operators and automation will consume.Testing
go test ./...go vet ./...make all/api/stateJSON, fleet rollup preservation, and StatsD metric names.