torch
Monitor live traffic on a MikroTik interface to find current bandwidth consumers, filtered by source address, destination address, or port.
Instructions
Live traffic snapshot of one interface
(/tool/torch interface=<interface> once=yes) - RouterOS's own
real-time traffic monitor, useful to answer "who is consuming
bandwidth on this link RIGHT NOW". interface is validated for
shape (validate_interface_name) before it is ever sent to the
device - existence isn't checked separately, so a typo'd/unknown
interface name simply produces whatever error RouterOS itself
returns.
src_address/dst_address (plain IPv4/IPv6 addresses -
validate_ip_address) and port (1-65535 -
validate_conntrack_dst_port, reused here for the same "TCP/UDP
port" shape) are all optional filters forwarded to RouterOS itself,
narrowing the snapshot BEFORE it ever leaves the device - use them
to cut down volume on a busy interface rather than fetching every
flow and filtering client-side.
once=yes makes this a single instantaneous snapshot, not a
continuous stream (same "once" convention as interface_traffic/
poe_status/lte_status - see client.MikrotikClient.torch), so
the call always returns promptly instead of opening RouterOS's
normal interactive torch stream.
VOLUME CAP: regardless of how many flows RouterOS reports for this
snapshot, the result's flows list is sorted by total traffic
(tx+rx bytes, biggest first - the "top talkers") and hard-capped at
MAX_TORCH_LIMIT (50) entries - truncated is true whenever more
flows matched than were returned, and total_matched always reports
the real (pre-cap) count. RouterOS's own torch field names for a
flow's traffic volume aren't perfectly uniform across RouterOS
versions/hardware - this sorts by whichever of tx/rx (bits- or
bytes-per-second, depending on version) the device actually
returned, defaulting a flow with neither to 0 (sorted last) rather
than failing the whole call over one unexpected row shape.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | ||
| interface | Yes | ||
| device_name | Yes | ||
| dst_address | No | ||
| src_address | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||