feat(mcp): get_host groups a host's parts by kind and says what it cut
#5012 "get_host cuts `parts` without saying so" - The agent's sub-resources come back as mounts (fullest first), interfaces and disk_io (busiest first) and temperatures (hottest first), each bounded on its own with total, truncated and a `more` that names parts_limit and query_metrics. - Per-core CPU is a summary (count, min/avg/max, three busiest), so 38 cores no longer push every interface out of the reply. - New argument parts_limit (default 20, max 200). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -139,7 +139,9 @@ def test_diagnostic_tools_over_a_seeded_fleet(app):
|
||||
assert detail["host_id"] == hid
|
||||
assert [m["state"] for m in detail["monitors"]] == ["down"]
|
||||
assert detail["monitors"][0]["error"] == "timeout"
|
||||
assert detail["agent"]["parts"]["/"]["disk_used_pct"] == 41.0
|
||||
mount = detail["agent"]["mounts"]
|
||||
assert mount["items"][0]["mount"] == "/" and mount["items"][0]["disk_used_pct"] == 41.0
|
||||
assert mount["total"] == 1 and mount["truncated"] is False
|
||||
assert [a["rule_id"] for a in detail["active_alerts"]] == [rule_id]
|
||||
assert detail["ansible_target"] is None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user