This commit is contained in:
jpmvaz
2026-09-13 20:27:51 +01:00
commit 37b00787b9
23 changed files with 2581 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
# ============================================================
# UnPoller stack configuration
# This file MUST sit in the same folder as docker-compose.yml
# Do NOT use quotes. Do NOT put spaces around the = sign.
# ============================================================
# ---------- InfluxDB (v2) ----------
INFLUXDB_ADMIN_USER=unpoller
INFLUXDB_ADMIN_PASSWORD=CHANGEME_influx_password
INFLUXDB_ORG=unpoller
INFLUXDB_BUCKET=unpoller
# Generate a real token with: openssl rand -hex 32
INFLUXDB_ADMIN_TOKEN=REPLACE_WITH_LONG_RANDOM_TOKEN
# ---------- Grafana ----------
GRAFANA_USERNAME=admin
GRAFANA_PASSWORD=CHANGEME_grafana_password
# ---------- UnPoller ----------
POLLER_TAG=latest
POLLER_DEBUG=false
# Set to true only if you enabled DPI on your controller and want per-app data
POLLER_SAVE_DPI=false
# ---------- UniFi Controller ----------
# This is the account you create ON the controller (see instructions).
UNIFI_USER=unpoller
UNIFI_PASS=CHANGEME_set_this_on_your_controller
#
# IMPORTANT: This must be the address of your UniFi CONTROLLER,
# which may or may not be the same box as your Docker host.
#
# * UniFi OS device (UDM / UDM-Pro / UDR / UXG / CloudKey Gen2+):
# NO port -> https://192.168.69.180
# * Self-hosted Network app / older CloudKey:
# WITH port -> https://192.168.69.180:8443
#
UNIFI_URL=https://192.168.69.180
@@ -0,0 +1,67 @@
# UnPoller + InfluxDB 2.x + Grafana
# Run on the Docker host at 192.168.69.180
# All secrets/config live in the .env file next to this file.
services:
influxdb:
image: influxdb:2.7
container_name: unpoller-influxdb
restart: unless-stopped
ports:
- '8086:8086'
volumes:
- influxdb-storage:/var/lib/influxdb2
- influxdb-config:/etc/influxdb2
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=${INFLUXDB_ADMIN_USER}
- DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
- DOCKER_INFLUXDB_INIT_ORG=${INFLUXDB_ORG}
- DOCKER_INFLUXDB_INIT_BUCKET=${INFLUXDB_BUCKET}
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUXDB_ADMIN_TOKEN}
- DOCKER_INFLUXDB_INIT_RETENTION=0s # 0s = keep data forever
grafana:
image: grafana/grafana:latest
container_name: unpoller-grafana
restart: unless-stopped
ports:
- '3000:3000'
volumes:
- grafana-storage:/var/lib/grafana
depends_on:
- influxdb
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
- GF_INSTALL_PLUGINS=grafana-clock-panel,natel-discrete-panel,grafana-piechart-panel
unpoller:
image: ghcr.io/unpoller/unpoller:${POLLER_TAG}
container_name: unpoller
restart: unless-stopped
ports:
- '9130:9130' # Prometheus /metrics endpoint (optional health check)
depends_on:
- influxdb
- grafana
environment:
# ---- InfluxDB 2.x output ----
- UP_INFLUXDB_URL=http://influxdb:8086
- UP_INFLUXDB_ORG=${INFLUXDB_ORG}
- UP_INFLUXDB_BUCKET=${INFLUXDB_BUCKET}
- UP_INFLUXDB_AUTH_TOKEN=${INFLUXDB_ADMIN_TOKEN}
# ---- UniFi controller to poll ----
- UP_UNIFI_DEFAULT_URL=${UNIFI_URL}
- UP_UNIFI_DEFAULT_USER=${UNIFI_USER}
- UP_UNIFI_DEFAULT_PASS=${UNIFI_PASS}
- UP_UNIFI_DEFAULT_VERIFY_SSL=false # UniFi uses a self-signed cert
- UP_UNIFI_DEFAULT_SAVE_SITES=true
- UP_UNIFI_DEFAULT_SAVE_DPI=${POLLER_SAVE_DPI}
# ---- General ----
- UP_POLLER_DEBUG=${POLLER_DEBUG}
volumes:
influxdb-storage:
influxdb-config:
grafana-storage: