execute_monitor_action
Executes FortiGate monitor actions like bringing IPsec tunnels up or down, closing sessions, flushing cache, or deauthenticating users; device state changes require writes enabled.
Instructions
Run a monitor action (POST /api/v2/monitor/{path}): tunnel up/down, session close, cache flush, user deauthentication, etc.
Examples: path "vpn/ipsec/tunnel_down" data {"p1name": "branch-vpn"}; path "firewall/session/close" data {"saddr": "10.0.0.5", "daddr": "...", "sport": 1, "dport": 443, "pro": "tcp"}; path "user/firewall/deauth" data {"user": "alice", "ip": "10.0.0.5"}. These change device state and require writes to be enabled.
Parameters:
device_id: Identifier of the FortiGate device
path: monitor action path
data: Optional JSON body
vdom: Virtual Domain name (optional)
Returns:
The raw JSON response
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | JSON body | |
| path | Yes | monitor action path, e.g. vpn/ipsec/tunnel_down | |
| vdom | No | Virtual Domain | |
| device_id | Yes | FortiGate device identifier |