Skip to content

A UniFi network

Offices and homes running UniFi switches, gateways and access points

What it is for

Read the whole UniFi network from the controller: one block in agent.yaml, and every switch, gateway and access point it has adopted arrives from that one address.

Measured on a self-hosted UniFi Network Application 10.6.101 with thirteen devices.

What goes unnoticed without it

An access point dropped off at 02:00, a switch port renegotiated, and when the core switch lost power, every host behind it went quiet in the same second and the alerts named the hosts instead of the switch.

How to set it up

  1. Create a local View Only account

    In UniFi Network, under Admins & Users, add a local admin with the View Only role. A Ubiquiti SSO login does not work against the local API.

  2. Read the controller’s fingerprint

    A self-hosted controller usually answers on port 8443.

    openssl s_client -connect <address>:8443 </dev/null 2>/dev/null |
      openssl x509 -fingerprint -sha256 -noout
  3. Add one block to one agent

    On a host that can reach the controller, in /etc/ziix-observer/agent.yaml, then restart the agent.

    netdev.unifi.vendor: unifi
    netdev.unifi.address: 10.0.0.60:8443
    netdev.unifi.user: monitor
    netdev.unifi.password: "the password, in quotes"
    netdev.unifi.fingerprint: <the sha256 from the step above>
    
    sudo systemctl restart ziix-observer-agent

How you use it

Every device gets a row

Each switch, gateway and access point, with link state, its ports and the traffic per port with a link, and the block it came from.

The map draws itself

Topology uses each device’s uplink, the same field UniFi’s own topology view draws from.

A dead switch names its hosts

Only the addresses of your own monitored hosts are kept from the switch’s port tables, so a switch that stops answering can name the machines behind it. Phones and laptops are counted, never stored.

What it does not do

  • It reads. Logging in is the one POST the agent makes, and it changes nothing on the controller.
  • A UniFi OS console (UDM, Cloud Key Gen2) has not been measured yet, only a self-hosted Network Application.

Related use cases

Start with one host

Free covers a single host and seven days of logs. No card needed.