<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.7">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2020-10-09T12:20:42-07:00</updated><id>/</id><title type="html">bensonk.net</title><subtitle>Benson's place for putting random stuff that might be useful to someone</subtitle><entry><title type="html">Unifi Poller Setup</title><link href="/networking/2020/10/09/welcome-to-jekyll.html" rel="alternate" type="text/html" title="Unifi Poller Setup" /><published>2020-10-09T11:40:08-07:00</published><updated>2020-10-09T11:40:08-07:00</updated><id>/networking/2020/10/09/welcome-to-jekyll</id><content type="html" xml:base="/networking/2020/10/09/welcome-to-jekyll.html">&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Add necessary keys
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;wget -q -O - https://golift.io/gpgkey | sudo apt-key add -&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Add debian package repositories
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;echo deb https://dl.bintray.com/golift/ubuntu bionic main | sudo tee /etc/apt/sources.list.d/golift.list&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;echo &quot;deb https://packages.grafana.com/oss/deb stable main&quot; | sudo tee -a /etc/apt/sources.list.d/grafana.list&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Install packages
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;sudo apt-get update&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;sudo apt-get install prometheus grafana unifi-poller&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Edit config files
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;vim /etc/prometheus/prometheus.yml&lt;/code&gt;
        &lt;ul&gt;
          &lt;li&gt;Add in the snippet from &lt;a href=&quot;https://github.com/unifi-poller/unifi-poller/wiki/Prometheus#single-controller&quot;&gt;this section&lt;/a&gt; 
of the unifi-poller prometheus docs&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;vim /etc/unifi-poller/up.conf&lt;/code&gt;
        &lt;ul&gt;
          &lt;li&gt;Create a readonly account for unifi poller in your unifi dashboard&lt;/li&gt;
          &lt;li&gt;Take a peek at the &lt;a href=&quot;https://github.com/unifi-poller/unifi-poller/wiki/Configuration&quot;&gt;instructions&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;Add your dashboard’s URL, username, and password to &lt;code class=&quot;highlighter-rouge&quot;&gt;up.conf&lt;/code&gt;&lt;/li&gt;
          &lt;li&gt;Enable prometheus&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;grafana-server&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;unifi-poller&lt;/code&gt;, and &lt;code class=&quot;highlighter-rouge&quot;&gt;prometheus&lt;/code&gt; are all configured to start on boot
    &lt;ul&gt;
      &lt;li&gt;Last time I did this, only grafana needed work: &lt;code class=&quot;highlighter-rouge&quot;&gt;sudo systemctl enable grafana-server.service&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;</content><author><name></name></author><summary type="html">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.</summary></entry></feed>