Collecting Unifi controller data with collectd

By · Published · networking, collectd, unifi

As you can tell from the last few posts, I've been having a lot of fun with collectd and instrumenting my systems. But I had one glaring hole until recently: my Ubiquti Unifi AP access points. Well no longer!

I came across an NPM package that could easily extract data from the Unifi controller software. From there, it was trivially easy to implement a script that harvests data from the controller and passes is along to collectd.

Thus, collectd-unifi was born.

Getting started with it is pretty easy. Just clone the repo, install the NPM dependencies and edit the config file. Once you have the script working, you can use the Exec plugin in collectd to run the script:

LoadPlugin exec
<Plugin "exec">
    Interval 60
    Exec "daemon:daemon" "/usr/bin/nodejs" "/opt/collectd-unifi/unifi.js"

Restart collectd and you should now have Unifi data flowing.

( Comments )

Did something I wrote help you out?

That's great! I don't earn any money from this site - I run no ads, sell no products and participate in no affiliate programs. I do this solely because it's fun; I enjoy writing and sharing what I learn.

All the same, if you found this article helpful and want to show your appreciation, here's my wishlist.

Related Posts

More collectd and pfSense Fun!

Collecting Data From pfSense Using collectd

comments powered by Disqus