by acls us

Monitoring UBNT UniFi WiFi with Zabbix and Node Red



Node Red


Having implemented Zabbix monitoring for Tanaza managed WiFi devices (here), the next step was to monitor Ubiquiti UniFi APs that were managed via a UniFi Controller. Ubiquiti have been more and more of a closed system over the last couple of years as they introduce more ways to lock in their customers by introducing management systems and hardware that prevent their hardware being used by more Open Systems. A particular example is the UniFi AP v2 which has been locked down to prevent the installation of third party Firmware, although they are very coy about this. So OpenWRT with a Zabbix Agent cannot be installed. This means that the only Zabbix monitoring available is to PING the devices.


The approach taken to getting UniFi Controller Managed WiFi APs into the same Zabbix monitoring environment as other network devices was to make use of the UniFi Controller API. This API is not at all well documented and may disappear if Ubiquiti decide the lock down their systems even further. The API exposed a number of end points that return JSON encoded data. These are used by a timer driven Node Red flow that queries the UniFi Controller every 120 seconds via a Logon, a query for the sites names and queries for all the devices/clients per site. The flow then totals up the number of connected clients per UniFi AP and passes the device's status, site name and connected clients to Zabbix via the Zabbix Sender.

PS - There is a Node Red Node available for communicating directly with the UniFi Controller API "node-red-contrib-unifi" but I have not personally tried this out yet.