query_utm_log
Retrieve FortiGate UTM security logs to determine which website or application was blocked for a host and which security profile enforced the action.
Instructions
Query UTM (security) logs: webfilter, app-ctrl, ips, virus, dns, emailfilter, dlp, ssl, anomaly, waf, file-filter, ssh, voip, icap, virtual-patch.
Use it to see which site or application was blocked for a host and by which profile.
Parameters:
device_id: Identifier of the FortiGate device
log_type: webfilter (default) or one of the types above
rows: Maximum records (default 50, max 500)
source_ip: Optional source IPv4 filter
raw_filter: Optional FortiOS filter, e.g. "action==blocked"
source: "memory" (default) or "disk"
vdom: Virtual Domain name (optional)
Returns:
One line per record: time, action, src -> dst, hostname/application/attack, policy
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | Maximum records | |
| vdom | No | Virtual Domain | |
| source | No | Log source | memory |
| log_type | No | UTM log type (webfilter, app-ctrl, ips, virus, dns, ...) | webfilter |
| device_id | Yes | FortiGate device identifier | |
| source_ip | No | Source IPv4 filter | |
| raw_filter | No | Raw FortiOS filter expression |