Unifi Poller Setup
Unifi-poller is a tool to extract metrics from the Unifi network control plane, store them in a timeseries database like prometheus’ tsdb, and provide meaningful dashboards. We’ll set it up on a debian machine using prometheus.
One interesting note is that all of this works great for me on a raspberry pi 3 model B. It’s pretty awesome to live in a world where such an inexpensive, low power device can run this kind of awesome stuff. The Raspberry Pi OS distribution of Debian works great with these instructions.
- Add necessary keys
wget -q -O - https://golift.io/gpgkey | sudo apt-key add -
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
- Add debian package repositories
echo deb https://dl.bintray.com/golift/ubuntu bionic main | sudo tee /etc/apt/sources.list.d/golift.list
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
- Install packages
sudo apt-get update
sudo apt-get install prometheus grafana unifi-poller
- Edit config files
vim /etc/prometheus/prometheus.yml
- Add in the snippet from this section of the unifi-poller prometheus docs
vim /etc/unifi-poller/up.conf
- Create a readonly account for unifi poller in your unifi dashboard
- Take a peek at the instructions
- Add your dashboard’s URL, username, and password to
up.conf
- Enable prometheus
grafana-server
,unifi-poller
, andprometheus
are all configured to start on boot- Last time I did this, only grafana needed work:
sudo systemctl enable grafana-server.service
- Last time I did this, only grafana needed work: