Skip to content

Documentation recommendation #42

@davidnewhall

Description

@davidnewhall

This is an email I got from Brad. Just sharing so it's not lost.

Hello,

I did get the unpoller working but I had a hell of a time with the docker compose and documentation with prometheus. Likely because for a metrics collector like this I typically just grab the docker, copy the compose off the documentation and head off to the races but I really had to dig into the application settings for this one. The documentation does mention some things like the UDMP API url being different than port 8443 but it's not clear that it just works on 443. They've also added an API to the controllers now but the documentation isn't super clear that that isn't the intended way to gather that data yet. However, the screenshots of setting up the ubiquiti local user are excellent to sort of imply this. I wanted to share my findings, hopefully this can help someone else or be implemented in documentation. One of the things that was tripping me up and I kept missing was the NAMESPACE vs USER. If you notice I had an unpoller but my user was called unifipoller and I just kept missing the difference between the two at some point.

Anyway, cool project, here's the outcome and notes. Hope it's useful somewhere. I ended up documenting and adding options, fixing issues with the docker compose along the way. I host my own prometheus and grafana servers so those images being included were not as useful to me but anyone should at least know docker well enough to remove those themselves. I did get it all working with my grafana and prometheus, so nice!

Thanks!

docker-compose.yml
services:
  unpoller:
    image: [ghcr.io/unpoller/unpoller:latest](http://ghcr.io/unpoller/unpoller:latest)
    restart: unless-stopped
    container_name: unpoller
    ports:
      - '9130:9130'                                                #Make the port available externally from docker for prometheus
    environment:
#Influx Settings
      - UP_INFLUXDB_DISABLE=true                                                      #Disable Influxdb
      - UP_POLLER_DEBUG=false                                                           #Turn off debug
#Prometheus Settings
      - UP_PROMETHEUS_DISABLE=false
      - UP_PROMETHEUS_HTTP_LISTEN=[0.0.0.0:9130](http://0.0.0.0:9130/)                         #Create the port for prometheus port to pull from
      - UP_PROMETHEUS_NAMESPACE=unpoller                                  #Name prometheus is looking for in its configuration.
      - UP_PROMETHEUS_REPORT_ERRORS=false
      - UP_PROMETHEUS_BUFFER=50
#Unifi Settings
      - UP_UNIFI_DISABLE=false                                                              #Disable data collection from unifi
      - UP_UNIFI_DYNAMIC=true                                                              #Allow Dynamic updates from prometheus
      - UP_UNIFI_CONTROLLER_0_URL=[https://192.168.1.1:443](https://192.168.1.1/)          #API address for ubiquiti device. Dream machines use 443, other devices may use port 8443
      - UP_UNIFI_CONTROLLER_0_USER=unifipoller                             #API User account configured on ubiquiti device
      - UP_UNIFI_CONTROLLER_0_PASS=YOURPASSWORD               #Password for user configured on ubiquiti device
      - UP_UNIFI_CONTROLLER_0_SAVE_ALARMS=true                      #May not be used with prometheus 
      - UP_UNIFI_CONTROLLER_0_SAVE_ANOMALIES=true                #May not be used with prometheus
      - UP_UNIFI_CONTROLLER_0_SAVE_DPI=true                               #May not be used with prometheus
      - UP_UNIFI_CONTROLLER_0_SAVE_EVENTS=true                      #May not be used with prometheus
      - UP_UNIFI_CONTROLLER_0_SAVE_IDS=true                              #May not be used with prometheus
      - UP_UNIFI_CONTROLLER_0_SAVE_SITES=true                          #true, no explanation available.
      - UP_UNIFI_DEFAULT_VERIFY_SSL=false                                     #Allow connection without valid ssl certificate.
  • Prometheus config
  # The job to scrape metrics from Unpoller.
  - job_name: 'unpoller'
    # Override the global default.
    scrape_interval: 5s
    static_configs:
      - targets: ['[192.168.1.40:9130](http://192.168.1.40:9130/)']

Just a user sharing their experience from setting up your project. No shade, it's appreciated. Github didn't seem appropriate because I had so much to say.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions