Repository navigation
fix(infra): read host filesystem utilization from the used state only - #1385
Conversation
system.filesystem.utilization reports used, free and reserved rows per mountpoint. The host page's filesystem chart and the Host Metrics dashboard template averaged all three, so every disk read about a third full. hostGaugeTimeseriesQuery takes an attributeEquals pin and the filesystem spec sets state = 'used'; the template adds the same filter. CPU and memory stay per-state stacked breakdowns.
Maple review🟢 Confidence 9/10 · safe to merge Host filesystem utilization now reads only the
What was checked
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 45 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
system.filesystem.utilizationreports one row perstate(used, free, reserved) for each mountpoint. Two readers didn't filter onstate:/infra/hosts/$hostName):hostMetricSpec("filesystem")runshostGaugeTimeseriesQuerygrouped bymountpoint, which averaged the three states.HostDetailChartplots the rows as returned, so every disk showed about 33%.attr.mountpointwith no state filter. Same bug.CPU and memory are correct. Both group by
state, and the host page stacks them (stacked = metric === "cpu" || metric === "memory"), so each state is its own series and they sum to 100%. The host summary/list queries already pinstate = 'used'for disk.Fix
hostGaugeTimeseriesQuerytakes an optionalattributeEquals: { key, value }that adds anAttributes[key] = valuecondition.hostMetricSpec("filesystem")setsattributeEquals: { key: "state", value: "used" }, and the API query passes it through.attr.state = "used".Tests
infra.test.ts: compiled SQL containsAttributes['state'] = 'used'when the pin is set, and no state filter when it isn't.query-helpers.test.ts(new): the filesystem spec compiles with theusedpin, and the CPU/memory specs keep every state.query-specs.test.ts: the template's filesystem widget carriesattr.state = "used".🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.