🕰️ Yet Another Inconsistency in UniFi Logs: CEF and Time Zones

TL;DR: UniFi devices generate CEF events with inconsistent timestamp formats depending on where you enable activity logging.
- CEF events from "UniFi Network" use UTC timestamps.
- CEF events from "UniFi OS" use local time (without time zone info).
- Non-CEF events also use local time.
If you're parsing logs or building integrations, this inconsistency matters. Dear Ubiquiti: pick one.

In my previous post, I wrote that CEF event timestamps from UniFi devices use the UTC time zone. After digging deeper, I need to clarify that statement. And in doing so, I'm documenting yet another inconsistency in how UniFi logs work.

But first, let's take a quick look at what a CEF event is supposed to look like—and while we're at it, a brief CEF history lesson.

The Common Event Format (CEF) was created by ArcSight, one of the early SIEM vendors. ArcSight was later acquired by HP, and eventually ended up at Micro Focus. You can find the official CEF documentation here:
Micro Focus CEF documentation

From that documentation, a standard CEF event looks like this:
CEF:Version|Device Vendor|Device Product|Device Version|Device Event Class ID|Name|Severity|[Extension]

Here's a partial example of a real CEF event from a UniFi device:
Aug 05 15:35:08 pandora CEF:0|Ubiquiti|UniFi Network|9.3.45|201|Threat Detected and Blocked|7|proto=TCP src=81.181.129.172…

(You'll need that structure to follow along with which fields I'm referencing.)


Two ways to enable Activity Logging

There are two places in the UniFi UI where you can enable Activity Logging:

  • Settings (gear icon) → CyberSecure → Traffic Logging Integrations → Activity Logging (SIEM Server)
  • Settings (gear icon) → Control Plane → Integrations → Activity Logging (SIEM Server)

Here's the difference:

✔️ CyberSecure → Activity Logging

  • Enables various events
  • Some (not all) are in CEF format
  • In these CEF events, the Device Product field is UniFi Network
  • These events use UTC timestamps

✔️ Control Plane → Activity Logging

  • Enables a different set of CEF events
  • In these, the Device Product field is UniFi OS
  • These events use the local time zone for timestamps

Side note: I haven't seen the "UniFi OS" CEF events show up in the UI under the "Logs" page. The only way to access them appears to be via external syslog—so you'll need to send them to a syslog server, SIEM, or log management tool.


Summary for log parsers and integrators:

  • 🟠 Non-CEF events → Use local time zone
  • 🟠 CEF events from "UniFi OS" → Use local time zone
  • 🟢 CEF events from "UniFi Network" → Use UTC

Dear Ubiquiti,

Please pick one. I'd strongly prefer all event timestamps to use UTC. But regardless of which you choose—be consistent.

And if you do decide to use local time, include the time zone in the timestamp format. It's 2025, after all.

Comments

Popular posts from this blog

🕰️ Inconsistent Time Zones in UniFi Logs

📅 UniFi Logs and the Missing Time Zone: Why It Matters

Missing Fields in Teleport VPN Logs: Why the Remote IP Matters