Ubiquiti UniFi Data In Graylog

Ubiquiti UniFi Data In Graylog

If you’re running Ubiquiti UniFi across your network, you already know how much activity passes through it: every firewall decision, every DNS query, every DHCP lease, and every intrusion attempt your gateway detects and blocks. Graylog provides a purpose-built way to make that signal immediately actionable. The Ubiquiti UniFi Content Pack, available with an Illuminate license and Graylog Enterprise or Graylog Security, delivers ready-to-use parsing rules, a stream, an index set, GIM categorization, and a Spotlight dashboard so you can turn raw UniFi syslog and CEF messages into structured, searchable security intelligence.

 

What is Ubiquiti UniFi?

Ubiquiti UniFi is a family of networking and monitoring products that spans wireless access points, routers and gateways, switches, security cameras, and controllers, either cloud-hosted or on-premises. These components work together under a single management layer to give administrators a cohesive view of their environment. UniFi OS runs the platform, UniFi Network manages routing, switching, and wireless, and UniFi Protect manages video surveillance.

Because UniFi gateways and access points sit at the center of your network traffic, their logs capture which connections were allowed or dropped, which names clients resolved, which devices requested addresses, and which threats were stopped at the edge. Getting that data into Graylog in a normalized, correlated form is what turns a stream of raw UniFi syslog into usable detection and investigation data.

 

What This Pack Does

The Ubiquiti UniFi Content Pack is purpose-built for UniFi OS 3.0+, UniFi Network 7.3+, and UniFi Protect 2.7+. Once installed, it parses both UniFi syslog messages and CEF-formatted SIEM integration logs, normalizes and enriches them, and maps common events of interest to the Graylog Information Model (GIM).

Included in the pack:
Stream: Illuminate:Ubiquiti Unifi Messages, created automatically if it doesn’t exist, with routing preconfigured and no stream rules required.
Index Set: Ubiquiti Unifi Logs, pre-defined with a daily rotation and 90-day retention, adjustable after installation.
Parsing Rules: Field extraction, normalization, and enrichment for UniFi syslog and CEF-formatted messages.
CEF Parsing: Support for UniFi Network SIEM integration logs, including IDS/IPS alerts, admin access, WiFi client events, and system events.
GIM Categorization: Event type categorization and enforcement fields for firewall, DNS, DHCP, and IDS/IPS events.
Spotlight: The Ubiquiti UniFi Overview dashboard.

 

Requirements
UniFi OS 3.0+, UniFi Network 7.3+, or UniFi Protect 2.7+ (UniFi Network 8.5+ for CEF/SIEM export)
A dedicated syslog input configured for UniFi log delivery
An Illuminate lookup override mapping that input ID to ubiquiti_unifi

 

Getting Logs into Graylog

UniFi controllers write some logs with a syslog notation that includes a path, process name, and process ID, which makes them hard to identify by message content alone. To handle this, the pack uses a dedicated UniFi input plus an Illuminate lookup override that tells Illuminate to treat every message on that input as a UniFi message.

Step 1 — Create a Dedicated Syslog Input

  1. Create a new syslog input on the Graylog server and choose an unused port. If you already have an input that only receives UniFi logs, use that one.
  2. On the inputs list, select Received messages for the input.
  3. Copy the gl2_source_input value from any received message. This is the input ID you need in the next step.

Step 2 — Configure the Illuminate Input Routing Override

  1. Navigate to Enterprise > Illuminate and select the Customization
  2. Locate lookup_adapter_input_routing, then select Edit.
  3. Enter ubiquiti_unifi as the content_name.
  4. Paste the gl2_source_input ID you copied as the input_id.
  5. Select Configure value.

Step 3 — Configure UniFi Remote Syslog

  1. In UniFi Network, open the System settings page and go to Support.
  2. Enable remote logging and set Logging Levels to Auto.
  3. Under Remote Logging Location, enable Remote Server and check Syslog.
  4. Enter the Graylog server IP address and the port of the input you created in Step 1.

Step 4 — Enable CEF / SIEM Export (UniFi Network 8.5+)

UniFi Network 8.5 and later can export CEF-formatted logs for IDS/IPS alerts, admin access, WiFi client events, and system events.

  1. In the UniFi Network Application, navigate to Settings > Control Plane > Integrations > Activity Logging.
  2. Select SIEM Server as the destination.
  3. Enter the Graylog server IP and the same syslog input port.

CEF logs are sent over syslog (UDP) to the same input as your standard UniFi logs, so no separate input is required.

Step 5 — Install and Activate the Content Pack

In Graylog, navigate to Enterprise > Illuminate, locate the Ubiquiti UniFi Processing Pack and Spotlight, and activate them. The stream and index set are created automatically. No additional stream rules are needed.

Ubiquiti UniFi Log Message Processing

UniFi devices send syslog messages that carry the device name, MAC address, model and firmware version, and the daemon that generated the event. CEF messages add a structured header plus UniFi-specific extension fields. Key elements extracted include:

  • Device context: the UniFi device name, MAC address, and model, plus the daemon or process that generated the event (such as dnsmasq).
  • Firewall details: the rule chain, rule description, inbound and outbound interfaces, source and destination IPs and ports, protocol, and TCP flags.
  • Name resolution: the queried domain and the upstream server the query was forwarded to.
  • DHCP activity: discover, offer, request, acknowledgement, and NAK messages.
  • CEF threat context: event ID, severity, category and subcategory, risk level, and the IPS signature name and ID.

Here is an example of a DNS query:

APSomewhere f091234518f6,UAP-AC-Pro-Gen2-6.2.49+14111: dnsmasq[4797]: forwarded www.graylog.org to 10.10.10.10

Here is an example of a firewall event:

Office-DM-Pro [LAN_LOCAL-RET-2147483647] DESCR="no rule description" IN=br148 OUT= MAC=60:22:32:28:41:e5:d0:21:f9:96:fa:d8:08:00 SRC=10.148.153.76 DST=10.148.0.1 LEN=1500 TOS=00 PREC=0x00 TTL=64 ID=10151 DF PROTO=TCP SPT=33725 DPT=7550 SEQ=270903990 ACK=2412021963 WINDOW=913 ACK URGP=0

Here is an example of a CEF IDS/IPS alert:

pandora CEF:0|Ubiquiti|UniFi Network|9.4.19|201|Threat Detected and Blocked|7|proto=TCP src=81.181.129.172 spt=54321 dst=192.168.0.233 dpt=443 UNIFIcategory=Security UNIFIsubCategory=Intrusion Prevention UNIFIhost=Office-UDM-Pro UNIFIdeviceMac=84:78:48:80:0d:86 UNIFIdeviceName=Office-UDM-Pro UNIFIdeviceModel=UDM-Pro UNIFIdeviceIp=192.168.0.1 UNIFIrisk=medium UNIFIipsSignature=ET DROP Dshield Block Listed Source group 1 UNIFIipsSignatureId=2402000 msg=A network intrusion attempt has been detected and blocked.

 

Events Processed by This Pack

The content pack processes a broad range of UniFi event types, including:

  • Firewall events: allowed connections and connections blocked by drop rules.
  • DNS events: queries forwarded by dnsmasq, with and without responses.
  • DHCP events: discover, offer, request, acknowledgement, and NAK messages.
  • IDS/IPS events: threats detected and blocked by UniFi intrusion prevention, delivered as CEF.
  • CEF SIEM integration events: admin access, WiFi client events, and system events from UniFi Network 8.5+.

 

GIM Categorization

Ubiquiti UniFi events are mapped to the Graylog Information Model, enabling consistent correlation with other data sources across your environment:

Event Log Type / Condition GIM Code GIM Category GIM Subcategory
Network connection (allowed) firewall, all firewall events 120000 network network.network_connection
Network connection (blocked) firewall, drop rules (-D- chain pattern) 120000 network network.network_connection
DNS query dnsmasq, query only 140000 name_resolution name_resolution.dns_request
DNS query + response dnsmasq, query with response 140000, 140200 name_resolution name_resolution.dns_request + dns_answer
DHCP request dnsmasq-dhcp, DHCPREQUEST 290000 dhcp dhcp.request
DHCP offer dnsmasq-dhcp, DHCPOFFER 290100 dhcp dhcp.offer
DHCP discovery dnsmasq-dhcp, DHCPDISCOVER 290200 dhcp dhcp.discovery
DHCP acknowledgement dnsmasq-dhcp, DHCPACK 290300 dhcp dhcp.acknowledgement
DHCP default dnsmasq-dhcp, DHCPNAK 299999 dhcp dhcp.default
IPS threat detected and blocked CEF, event ID 201 300000 detection detection.network_detection

 

Why Log Ubiquiti UniFi Events?

Collecting UniFi logs gives you more than a record of network traffic. It directly supports security detection, incident response, and compliance audit use cases across your gateways, switches, and wireless.

Security Monitoring

  • Surface UniFi IPS threats detected and blocked as network detections in real time
  • Use the IPS signature name, signature ID, and risk level to prioritize alerts
  • Watch for spikes in blocked connections that point to scanning or probing
  • Track admin access events to catch unexpected changes to your network configuration

Threat Hunting

  • Pivot from an IPS alert’s source IP to every allowed connection from the same address
  • Review DNS queries for lookups of suspicious, newly seen, or known-bad domains
  • Spot internal hosts generating unusual DNS volume that may indicate tunneling or malware beaconing
  • Correlate WiFi client events with firewall and DNS activity from the same device

Incident Response

  • Reconstruct a host’s activity across firewall, DNS, DHCP, and IPS events on a single timeline
  • Use DHCP events to tie an IP address back to the device that held it at the time
  • Identify which firewall rule chain allowed or dropped traffic during an incident
  • Scope an incident across multiple sites using the UniFi device name and MAC address

Compliance & Audit

  • Maintain a durable, searchable record of firewall enforcement, name resolution, and address assignment
  • Keep an audit trail of administrative access to your UniFi environment
  • Support network security monitoring controls required by frameworks such as PCI DSS, HIPAA, ISO 27001, and SOC 2

 

Graylog Enterprise and Security

With Graylog Enterprise and Security, your team gains structured visibility into the network enforced by your Ubiquiti UniFi gateways and access points. The Ubiquiti UniFi Content Pack turns raw UniFi syslog and CEF messages into searchable, correlated, GIM-tagged data that flows directly into your threat detection, alerting, and investigation workflows. For more on this integration, please follow the documentation.

Categories

Get the Monthly Tech Blog Roundup

Subscribe to the latest in log management, security, and all things Graylog blog delivered to your inbox once a month.