Events and logs
About 800 words
unifi events get reads the controller's system log: devices going offline, clients connecting and roaming, intrusion alerts, firmware updates, and what administrators changed. It's the first place to look when someone asks what happened last night.
$ unifi events get --limit 8
AGE CATEGORY MESSAGE SUBJECT
● 260d ago client iPad Air connected to Nordlicht on AP Living Room (5 GHz). iPad Air
✗ 260d ago security Blocked ET SCAN Suspicious inbound to MSSQL port 1433 from 19… Dream Machine Pro Max
● 260d ago client Guest DESKTOP-7Q2K4LM connected to Nordlicht Guest on AP Offi… DESKTOP-7Q2K4LM
● 260d ago client Pixel 9 Pro roamed from AP Hallway Mesh to AP Living Room. Pixel 9 Pro
● 260d ago admin admin signed in from 192.168.10.20. -
● 260d ago client Pixel 9 Pro (WireGuard) connected to the WireGuard VPN server. Pixel 9 Pro (WireGuard)
✗ 260d ago device AP Garden was disconnected. AP Garden
▲ 260d ago device Port 1 (AP Garden) of Garage Switch stopped supplying PoE. Garage SwitchEvents come newest first, 50 at most unless you set --limit. The mark in the first column is the severity: a dot for info, a triangle for a warning, a cross for critical. --output wide adds the absolute timestamp, the actor and the controller's event key. unifi events on its own is the same as unifi events get, flags included: unifi events --limit 3 works.
The ages look odd here because the demo controller's clock is frozen in March 2026.
Narrow it down
| Flag | Keeps |
|---|---|
--since <when> | events since a duration ago (30m, 2h, 7d) or a point in time (2026-03-01, 2026-03-01T08:00:00Z) |
--severity <level> | events at least this severe: info, warning, critical |
--category <stream> | one stream: device, client, security, admin, update, system |
--filter <expr> | events matching a filter expression |
--limit <n> | at most n events |
They combine:
unifi events get --since 2h --severity warning # anything worrying in the last two hours
unifi events get --category security --since 7d # a week of IDS/IPS alerts
unifi events get --filter 'subject == "AP Garden"' # the history of one device
unifi events get --filter 'message contains "roamed"' --category clientFilter fields are actor, category, id, key, message, severity, subject and time.
The audit log
--audit shows what administrators did and who did it. It's the same as --category admin, with the actor in its own column:
$ unifi events get --audit --limit 5
AGE ACTOR MESSAGE SUBJECT
● 260d ago admin admin signed in from 192.168.10.20. -
● 260d ago admin admin updated firewall/policies "Reject Cameras to Internet". -
● 261d ago admin admin blocked Unknown ESP Device. Unknown ESP Device
● 261d ago admin admin created hotspot/vouchers "Weekend guests 2". -
● 261d ago admin admin created hotspot/vouchers "Weekend guests 1". -Changes made with unifi-cli show up here too, under the administrator who owns the API key. That makes unifi events get --audit --since 1h the quick answer to "what changed in the last hour", and a per-person API key the way to keep that answer meaningful.
Follow the log
unifi events get --follow
unifi events get -f --category device --severity warningWith --follow, the command prints the existing events oldest first and then keeps running, printing new events as they happen until you press ctrl+c. It asks the controller for new events every five seconds; --interval changes that.
-f is the short form of --follow, as in tail -f. --filter has no short form, here or on any other command.
Feed other tools
With --output json, a normal run prints one JSON array. A --follow run prints one JSON object per line instead, which is what line-oriented tools expect:
# Send critical events to syslog as they happen
unifi events get --follow --severity critical --output json \
| jq --unbuffered -r '"\(.subject): \(.message)"' \
| while read -r line; do logger -t unifi "$line"; done
# Count last week's IDS alerts by subject
unifi events get --category security --since 7d --limit 1000 --output json \
| jq -r '.[].subject' | sort | uniq -c | sort -rnAn event looks like this:
{
"id": "e4e2583c250568595269f2ef",
"time": "2026-03-14T20:30:00Z",
"category": "admin",
"severity": "info",
"key": "EVT_AD_ConfigChanged",
"message": "admin updated networks \"IoT\".",
"subject": "IoT",
"actor": "admin"
}What this log is, and isn't
The events come from the controller's internal API; the official Network API has no log endpoint yet. How far back the log reaches is up to the controller's retention, and the set of event keys differs between Network versions.
This is the controller's log about your network. The log of unifi-cli itself, which records its own requests and failures, is a file on your machine; see Troubleshooting.
