UniFi Poller – Amazing!

top feature image

UniFi Poller – Amazing!

I am a sucker for a pretty graph, and it is something I have spent countless hours working on. And for the most part my go-to stack is Zabbix and Grafana, though I have recently been working with InfluxDB to achieve a bunch of different stuff. And recently I came along UniFi Poller https://github.com/unifi-poller/unifi-poller.

I didn’t create this, and the credit doesn’t go to me. I have just put a guide together celebrating their great work.

UniFi poller pulls metrics directly from the UniFi Controller and saves it to InfluxDB which can then be pulled into Grafana for some beautiful graphs.

Install is pretty easy, and works a range of different platforms, I generally use Ubuntu for me, and in this case Ubuntu 1804, so my guide will be based around that. I’ll do a few URL’s to the guides I have followed, google is your friend here if you need to find for a different platform… why re-invent the wheel, and I am not going to pretend I am smart enough to build all of this. Credit goes to the URL’s listed and the authors there.

First: Setup Ubuntu with LAMP

For any Ubuntu Server I use that runs a web based service I install the LAMP Stack, Digital Ocean have a great guide for it, along with many others.


Second: Install Zabbix

Once again our friends at Digital Ocean have provided a great guide for this.


Third: Install Grafana

Grafana is the easiest platform in the world to install. Their own site has a bulletproof guide.


Fourth: Install InfluxDB

InfluxDB like Grafana is really easy to install, granted there are a few more steps with UniFi Poller, but in this part.


echo "deb https://repos.influxdata.com/ubuntu bionic stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
sudo curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
sudo apt -y update
sudo apt install -y influxdb
sudo systemctl start influxdb

Fifth: Install UniFi-Poller

These commands work for Ubuntu 1804, if you are using a different system check the Wiki on setting up UniFi Poller.


Sixth: Configure UniFi-Poller

Now that you have installed UniFi-Poller, you need to configure it to work with your UniFi Controller.


Seventh: Configure UniFi Controller

Add a user to the UniFi Controller. After logging into your controller:

Go to Settings -> Admins

Add a read-only user (unifipoller) with a nice long password.

The new user needs access to each site. For each UniFi Site you want to poll, add admin via the ‘Invite existing admin’ option.

Take note of this info, you need to put it into the unifi-poller config file in a moment.

Eighth: Import poller dashboards

Simply click the + on the left nav bar in Grafana and click Import.

Put in the ID for the dashboard (below) and click the blue Load button.

Select the InfluxDB or Prometheus data source you created previously.

Click the Green Import button on the last screen.

Repeat this for each dashboard you want.

The IDs for each database platform are below, use them.

You only need Prometheus or Influx, not both. Unless you really want both.

AppPrometheus IDInflux IDGet this if you…
Client DPI1131010419…enabled save_dpi
Sites1131110414…enabled save_sites
USW1131210417…have UniFi Switches
USG1131310416…have UniFi Gateways
UAP1131410415…have UniFi Access Points
Clients1131510418…love nano

Ninth: Wait…

The poller saves the data from the controller to InfluxDB, though it doesn’t pull in the historical data, InfluxDB pulls via UniFi Poller into the its own database so at first it may look like it hasn’t worked.

So this is not the be end and all guide, I am not the one who created all this amazing work, credit goes to those on the links provided. I am simply a huge fan and was asked by some to show how I achieved it.


Is this doable on a Raspberry Pi? I have several lying around, and this might be a good project for one of them.

Hi Dave,
So I went ahead and built the entire setup on a Pi 4; however, I am not getting any data into Grafana. The only error I am seeing is this: Apr 22 13:40:47 raspberrypi unifi-poller[2193]: 2020/04/22 13:40:47 [ERROR] metric fetch for InfluxDB failed: re-authenticating to unifi controller: Get dial tcp connect: connection refused. Do you happen to have an idea what I did wrong?

I’m trying to troubleshoot this. If I do a “sudo net stat -anop tcp | grep 844” on the Pi, there are no results, thus it doesn’t appear that anything is listening on 8443. I guess that means that somewhere sown the line I misconfigured something. Now, to find it.

Found the issue. This error is related to uni-poller. You have to put in the url, username, and password for your unified controller in up.conf. Once I did that, everything works great. I also learned that if you want DPI stats, it has to be enabled on the controller and in the up.conf file.


I ran into this issue as well. I did enter this in the up.conf:

url = “https://<>:8443”
user = “<>”
pass = “<>”

What am I missing? It might be that I didn’t add the new user to the site. I couldn’t find the option to invite an admin to a site on my UDM pro.

Yes, it will run on a Pi 4, but Influxdb is not terribly well performing on the default Rasbian 32 bit kernel, and Unifi-Poller in particular causes Influxdb to consume >100 CPU constantly, and also to go into endless compaction cycles.

I ended up moving unifi poller and influxdb to 64 bit Ubuntu on an Intel box.

Thanks for this! I installed on my Pi and mostly works but some of the stock dashboards show panels with ‘panel plugin not found’: Table-old, natel-discrete-panel to name a couple. Any thoughts?

The tl;dr is that the panels were created in Grafana 7 and you’re running Grafana 6. If you upgrade Grafana you wont have this issue. The other option is to edit the dashboard panels after import and select “table” where it says “table-old”.

Okay just to be clear I have to have two ubuntu servers? I have completed installing Zabbix, I am confused as to why I need another server running, lots of servers just to look at some pretty graphs lol.

Hey, hopefully I might be able to find some answers here. I went with the InfluxDB, Grafana, UniFi-poller running on a new instance in AWS Lightsail, and pulling UniFi information from another Lightsail instance. Works well, everything is displaying properly but have had no luck in getting Grafana to display current internet bandwidth being used in a “live” way. I got 30 down and 10-ish up (third world country, speeds are terrible generally speaking) and I want to be able to see through Grafana how much of those 30/10 are being used live. Any help?

Leave a Reply

Your email address will not be published. Required fields are marked *

Post navigation

Previous Post :   
%d bloggers like this: