list_active_sessions
Query live FortiGate session tables with optional source, destination, port, or policy filters to verify traffic flow and identify the matching policy.
Instructions
Query the live session table with optional filters.
Use it to check whether a host's traffic is actually flowing and which policy it matched.
Parameters:
device_id: Identifier of the FortiGate device
source_ip: Optional source IPv4 address
destination_ip: Optional destination IPv4 address
destination_port: Optional destination port
policy_id: Optional policy ID
count: Maximum sessions to return (default 50, max 500)
vdom: Virtual Domain name (optional)
Returns:
One line per session: protocol, source, destination, policy, duration, bytes, NAT
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vdom | No | Virtual Domain | |
| count | No | Maximum sessions to return | |
| device_id | Yes | FortiGate device identifier | |
| policy_id | No | Policy ID filter | |
| source_ip | No | Source IPv4 filter | |
| destination_ip | No | Destination IPv4 filter | |
| destination_port | No | Destination port filter |