run_adhoc_test
Runs ad-hoc Iperf, network speed, VoIP, or custom command tests on selected NetBeez agents and returns a test run ID for checking status or retrieving results.
Instructions
Run an ad-hoc test on one or more agents. Supported test types are Iperf (5), Network Speed (7), VoIP (8), and Custom Command (11). Ping/DNS/HTTP/Traceroute cannot be run ad-hoc via this endpoint.
Creates the test run and polls until completion. Returns the multiagent_nb_test_run_id; after running, use get_multiagent_test_run_status with that ID to check status or retrieve results (e.g. if this tool times out or you need to re-check later).
• test_type: use "iperf" (or "5"), "speed"/"speedtest" (or "7"), "voip" (or "8"), or "custom"/"custom_command" (or "11"). • speedtest_type (for Network Speed only): use "ookla", "ndt", "fast", or "cloudflare" (or "1","2","3","4"). • Iperf: provide either destination_agent_id (agent-to-agent) or target (destination IP or FQDN for agent-to-server; not a NetBeez target entity). • VoIP: agent-to-agent only; destination_agent_id required. • Custom Command: provide custom_command (script body with shebang) and output_schema (array of { metric, unit }); no destination is needed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent_ids": "<agent_ids>",
"test_type_id": "<test_type_id>"
},
"name": "run_adhoc_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| secure | No | Use secure connection (e.g. for VoIP) | |
| target | No | For Iperf agent-to-server: destination IP or FQDN (the server address; not a NetBeez target entity). Not used for VoIP. Required for Iperf when not using destination_agent_id. | |
| reverse | No | Reverse mode: server sends, client receives (default false) | |
| agent_ids | Yes | Agent IDs to run the test on (at least one) | |
| bandwidth | No | Bandwidth limit in Mbps, UDP only (optional) | |
| iperf_port | No | Iperf server port 1-65535 (default 5001) | |
| iperf_time | No | Iperf duration in seconds (default 10) | |
| iperf_type | No | Iperf protocol: tcp (1) or udp (2). Default: tcp. | |
| test_type_id | Yes | Test type. Words: iperf (5), speed or speedtest (7), voip (8), custom or custom_command (11). Numbers: 5, 7, 8, 11. | |
| iperf_version | No | Iperf version: 2 or 3 (default 3) | |
| output_schema | No | Custom command metrics schema for test_type 11. Array of { metric, unit } entries matching script output keys. | |
| custom_command | No | Custom command script body for test_type 11. Must start with #!/usr/bin/env bash or #!/usr/bin/env python. | |
| speedtest_type | No | Speed test provider (only for Network Speed tests). Words: ookla (1), ndt (2), fast or fast.com (3), cloudflare (4). Numbers: 1, 2, 3, 4. Default: ndt (2). | |
| parallel_streams | No | Parallel streams 1-16 (default 1) | |
| destination_agent_id | No | Destination agent ID. Required for VoIP. For Iperf agent-to-agent, the iperf server runs on this agent. Use either this OR target for Iperf, not both. |