😎
Docs
  • Tamm - Docs
  • Azure
    • Sentinel KQL Samples
    • Managed Identities
    • Deploy Sentinel with Terraform
  • Docker
    • Allow standard user to interact with Docker
    • Install Docker
    • Installing and working with Traefik
    • Installing specific version of Docker
    • Deploy Guacamole
    • Traefik geoblock
    • Unpoller Prometheus UCG Ultra
  • HomeAssistant
    • HAOS install on Proxmox
    • Zigbee2MQTT
    • HAOS Reverse Proxy
    • ZBDongle-E
  • Kali
    • Enable RDP
  • Kubernetes
    • Cert manager with Cloudflare
    • On prem loadbalancer metallb
    • Nginx ingress
    • Cloudinit Rancher ubuntu
    • Rancher Ubuntu 18.04 node template
    • Velero with minio backend
    • vsphere pvc (in-tree)
    • Velero cheat sheet
    • nginx annotations examples
  • Linux
    • Expand lvm disk vmware
    • Expand lvm disk fresh install
    • Disk usage
    • flush-dns
    • Netplan config example
    • Add user in photon OS
    • SSH-Keys
    • Set timezone
    • sudo nopasswd
    • Add custom alias
    • Rocky Linux commands
  • macOS
    • Uninstall System extensions
    • 1Password Github setup
  • Microsoft 365
    • Powershell Cheat sheet
  • Portainer
    • Install Portainer
    • Add docker node
  • Powershell
    • GenericList example
    • Mixed stuff n things
    • Synopsis Template
    • Powershell Oh-my-posh
    • Powershell Sync Profile
    • Cleanup and install MS Graph module
  • Proxmox
    • Disable No Subscription notification
    • Import from vmware error
    • Proxmox commands
    • Proxmox on Intel NUC
    • Proxmox E1000
  • Terraform
    • Getting started
    • Deploy Sentinel
  • Unifi
    • Unifi Network App (migration)
    • Slow vlan throughput
    • interface-explanation
  • Windows
    • Network settings access denied
    • Windows GVLK Keys
    • Windows Server 2025
Powered by GitBook
On this page

Was this helpful?

  1. Docker

Unpoller Prometheus UCG Ultra

I run my prometheus and grafana stack separate but on the same docker network 1.

services:
  prometheus:
    image: prom/prometheus
    container_name: prometheus
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
    restart: unless-stopped
    volumes:
      - 'prometheus:/etc/prometheus'
      - 'prom_data:/prometheus'
    networks:
      - traefik-proxy
  grafana:
    image: grafana/grafana
    container_name: grafana
    restart: unless-stopped
    environment:
      - GF_SECURITY_ADMIN_USER=admin
      - GF_SECURITY_ADMIN_PASSWORD=<your-password>
      - GF_INSTALL_PLUGINS=grafana-clock-panel,natel-discrete-panel,grafana-piechart-panel
    volumes:
       - 'grafana:/var/lib/grafana'
    networks:
      - traefik-proxy
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.grafana.rule=Host(`your-domain.com`)"
      - "traefik.http.routers.grafana.entrypoints=websecure"
      - "traefik.http.routers.grafana.tls=true"
      - "traefik.http.services.grafana.loadbalancer.server.port=3000"
      - "traefik.http.routers.grafana.tls.certresolver=letsencrypt"
      - "traefik.http.routers.grafana.tls.domains[0].main=your-domain.com"
      - "traefik.http.routers.grafana.tls.domains[0].sans=*.your-domain.com"
volumes:
  prom_data:
  prometheus:
  grafana:
networks:
  traefik-proxy:
    external: true
  1. Add the Prometheus data source from within Grafana

  2. Log in to Unifi and create the "service account"

  3. I set mine up like this

  1. Create the Unpoller stack By default, some guides says that "UP_UNIFI_CONTROLLER_0_URL" is supposed to be address:port, but that never worked for my UCG Ultra, removing the port did the trick for me.

name: unpoller
services:
  unpoller:
    image: ghcr.io/unpoller/unpoller:latest
    restart: unless-stopped
    container_name: unpoller
    environment:
      - UP_INFLUXDB_DISABLE=true
      - UP_POLLER_DEBUG=false
      - UP_UNIFI_DYNAMIC=false
      - UP_PROMETHEUS_HTTP_LISTEN=0.0.0.0:9130
      - UP_PROMETHEUS_NAMESPACE=unpoller
      - UP_UNIFI_CONTROLLER_0_PASS=<password-to-unpoller-account>
      - UP_UNIFI_CONTROLLER_0_SAVE_ALARMS=true
      - UP_UNIFI_CONTROLLER_0_SAVE_ANOMALIES=true
      - UP_UNIFI_CONTROLLER_0_SAVE_DPI=true
      - UP_UNIFI_CONTROLLER_0_SAVE_EVENTS=true
      - UP_UNIFI_CONTROLLER_0_SAVE_IDS=true
      - UP_UNIFI_CONTROLLER_0_SAVE_SITES=true
      - UP_UNIFI_CONTROLLER_0_URL=https://ipaddress-to-controller
      - UP_UNIFI_CONTROLLER_0_USER=unpoller
    networks:
      - traefik-proxy
networks:
  traefik-proxy:
    external: true
  1. Create the scrape config in Prometheus

  2. docker exec -it unpoller /bin/sh

  3. vi /etc/prometheus/prometheus.yml

  4. Add the scrape config

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: "prometheus"

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
      - targets: ["localhost:9090"]
  - job_name: 'unifipoller'
    scrape_interval: 30s
    static_configs:
      - targets: ['unpoller:9130']
PreviousTraefik geoblockNextHAOS install on Proxmox

Last updated 7 months ago

Was this helpful?

Import some example dashboards from

https://grafana.com/grafana/dashboards/?search=unifi-poller