Ubiquiti UniFi – How to View Log Files

 directory for Linux is mentioned below as it is the consistent folder location on the officially supported distros. It is the same whether you install the UniFi Network application on your own installation of Debian or Ubuntu, or a UniFi Cloud Key. Depending on the platform being used, and how it is configured, there will be other locations, but no matter what, on the supported distros, /usr/lib/unifi/logs will always contain the files.

There are three locations where you can view log files related to UniFi devices and the Network application: /var/log/messages, server.log, and mongod.log. See below what you will find in each.

1. UniFi Dream Machines

/var/log/messages

2. UniFi AP: contains info local to UniFi Access Points, like 802.11 info

/var/log/messages

3. UniFi Switch: contains info local to the switch, like port link state changes, spanning tree events, etc.

/var/log/messages

4. UniFi Security Gateway: contains USG’s general logging.

/var/log/messages

5. UniFi Network application:

  • Contains information about the Network application, communication with UAPs, etc:
server.log
  • Contains information about UniFi software local to Network application installed on a PC.
mongod.log

How to View Log Files: UniFi APs and Switches

To view log files under UAP and USW:

1. Connect to UAP or USW via SSH.
2. Type:

cat /var/log/messages

3. View output.

To view the live logs, with output updating in your SSH session as new logs are appended, run the following instead of the above cat command.

tail -f /var/log/messages

How to View Log Files: UniFi Security Gateways

To view log files under a USG:

1. Connect to the USG via SSH.
2. In the EdgeOS CLI, the log can be viewed by running the following commands:

General Logging

show log

IPsec VPN Logging

show vpn log 

FreeRADIUS Logging 

sudo cat /var/log/freeradius/radius.log

DNSmasq Logging

sudo cat /var/log/dnsmasq.log

IPS/IDS Engine Logging

sudo cat /var/log/suricata/suricata.log

3. View live logging.

To view the live logs, with output updating in your SSH session as new logs are appended, run the following instead of the cat command above.

tail -f /var/log/messages

User Tip:If a user would like to only get the last number of lines the tail utility can be used. The command below will output the last 10 lines of the radius.log file. 

sudo tail -n 10 /var/log/freeradius/radius.log

NOTE:Firewall logs aren’t in the UI yet. Please see this Community post for more details.  

How to Download Encrypted Log Files from the Network Application

The Network application also allows users to download log files to share with Ubiquiti support, but these logs are encrypted (for security reasons), so as the user, you wouldn’t be able to view the logs. For viewing, we continue to suggest all the options described above. It is important to note that this support file does not include device logs.

In the Network application, go to Settings System Settings > Maintenance > Support information, and click Download Logs.

For Network applications not hosted on UniFi OS Consoles, you can find the logs in the following locations:

  • Windows: C:\Users\<username>\Ubiquiti UniFi\logs\
  • macOS: /Users/<username>/Library/Application\ Support/UniFi/logs/
  • UniFi Cloud Key and Debian/Ubuntu Linux*: /usr/lib/unifi/logs/ 

    Source :
    https://help.ui.com/hc/en-us/articles/204959834-UniFi-How-to-View-Log-Files
Exit mobile version