feat(traffic): a host's top senders, on its page and as get_host_senders (#6115)
The host page gains a "Who's sending" panel, and the MCP a tool, that put the host's outbound (or inbound) traffic down to its containers and NFS mounts: read in shared time buckets, so the host's busiest bucket says who was sending in it. A swarm service's tasks add up under its name; what none of them accounts for is the host itself. Also fixes CI 9488: per-container net_rx_bps / net_tx_bps join the docker alert catalog, so a rule can catch a container flooding the uplink. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,10 +19,12 @@ def test_plugin_exposes_the_mcp_hooks():
|
||||
reg = MagicMock()
|
||||
agent_plugin.register_mcp_tools(reg)
|
||||
assert [c.args[0].__name__ for c in reg.call_args_list] == [
|
||||
"list_agents", "list_maintenance_plans", "get_maintenance_job", "run_maintenance"]
|
||||
"list_agents", "list_maintenance_plans", "get_maintenance_job", "get_host_senders",
|
||||
"run_maintenance"]
|
||||
roles = {c.args[0].__name__: c.kwargs["role"] for c in reg.call_args_list}
|
||||
assert roles["run_maintenance"].value == "admin" # as Update now on the page
|
||||
assert roles["get_maintenance_job"].value == "viewer"
|
||||
assert roles["get_host_senders"].value == "viewer"
|
||||
assert callable(agent_plugin.mcp_overview)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user