log_get
Read raw FortiGate log records from any log endpoint by device and path, with optional row limits, VDOM, and FortiOS filter expressions for targeted troubleshooting.
Instructions
Read raw log records from any log endpoint (GET /api/v2/log/{path}).
path is "{memory|disk}/{type}/{subtype}", e.g. "memory/event/system", "memory/event/vpn", "memory/utm/webfilter", "memory/traffic/local", "disk/traffic/forward". Prefer query_traffic_log / query_event_log / query_utm_log for formatted output.
Parameters:
device_id: Identifier of the FortiGate device
path: log path
rows: Maximum records (default 50, max 500)
filter_expr: Optional FortiOS filter, e.g. "srcip==10.0.0.5" ("&" joins several)
vdom: Virtual Domain name (optional)
Returns:
The raw JSON log records
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": {
"device_id": "<device_id>",
"path": "<path>"
},
"name": "log_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | log path, e.g. memory/event/system | |
| rows | No | Maximum records | |
| vdom | No | Virtual Domain | |
| device_id | Yes | FortiGate device identifier | |
| filter_expr | No | FortiOS filter expression(s), '&'-joined |