mirror of
https://github.com/unpoller/unpoller.git
synced 2026-10-21 01:58:06 +02:00
Complete InfluxDB v3 rollout: tests, docs, and docker example.
Add v3 integration and version tests, migration notes, InfluxDB 3 docker-compose stack, and README updates to finish the remaining plan phases. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -24,3 +24,12 @@ docker exec <container_name> /usr/bin/unpoller --health
|
||||
|
||||
The health check is automatically used by Docker and container orchestration
|
||||
platforms (Kubernetes, Docker Swarm, etc.) to determine container health status.
|
||||
|
||||
## InfluxDB 3 Core
|
||||
|
||||
Use `docker-compose-influxdb3.yml` with `docker-compose-influxdb3.env.example` to run UniFi Poller against InfluxDB 3 Core on port `8181`. Copy the env example, set `INFLUXDB_ADMIN_TOKEN` to a token created in InfluxDB 3, then start the stack:
|
||||
|
||||
```bash
|
||||
cp docker-compose-influxdb3.env.example docker-compose-influxdb3.env
|
||||
docker compose -f docker-compose-influxdb3.yml --env-file docker-compose-influxdb3.env up -d
|
||||
```
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# InfluxDB 3 Core
|
||||
# Create an admin token in InfluxDB 3 and set it here.
|
||||
INFLUXDB_ADMIN_TOKEN=CHANGEME
|
||||
INFLUXDB_DATABASE=unpoller
|
||||
|
||||
# Grafana
|
||||
GRAFANA_USERNAME=admin
|
||||
GRAFANA_PASSWORD=grafanaadmin
|
||||
|
||||
# UniFi Poller
|
||||
POLLER_TAG=latest
|
||||
POLLER_DEBUG=false
|
||||
POLLER_SAVE_DPI=false
|
||||
UNIFI_USER=unpoller
|
||||
UNIFI_PASS=set_this_on_your_controller
|
||||
UNIFI_URL=https://127.0.0.1:8443
|
||||
@@ -0,0 +1,52 @@
|
||||
# UniFi Poller with InfluxDB 3 Core.
|
||||
# See README.md in this directory and pkg/influxunifi/README.md.
|
||||
version: '3'
|
||||
services:
|
||||
influxdb3:
|
||||
restart: always
|
||||
image: influxdb:3-core
|
||||
ports:
|
||||
- '8181:8181'
|
||||
command:
|
||||
- influxdb3
|
||||
- serve
|
||||
- --node-id=node0
|
||||
- --object-store=file
|
||||
- --data-dir=/var/lib/influxdb3/data
|
||||
- --plugin-dir=/var/lib/influxdb3/plugins
|
||||
volumes:
|
||||
- influxdb3-data:/var/lib/influxdb3/data
|
||||
- influxdb3-plugins:/var/lib/influxdb3/plugins
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
restart: always
|
||||
ports:
|
||||
- '3000:3000'
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
depends_on:
|
||||
- influxdb3
|
||||
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
|
||||
unifi-poller:
|
||||
restart: always
|
||||
image: ghcr.io/unpoller/unpoller:${POLLER_TAG}
|
||||
depends_on:
|
||||
- grafana
|
||||
- influxdb3
|
||||
environment:
|
||||
- UP_INFLUXDB_VERSION=3
|
||||
- UP_INFLUXDB_URL=http://influxdb3:8181
|
||||
- UP_INFLUXDB_AUTH_TOKEN=${INFLUXDB_ADMIN_TOKEN}
|
||||
- UP_INFLUXDB_DATABASE=${INFLUXDB_DATABASE}
|
||||
- UP_UNIFI_DEFAULT_USER=${UNIFI_USER}
|
||||
- UP_UNIFI_DEFAULT_PASS=${UNIFI_PASS}
|
||||
- UP_UNIFI_DEFAULT_URL=${UNIFI_URL}
|
||||
- UP_POLLER_DEBUG=${POLLER_DEBUG}
|
||||
- UP_UNIFI_DEFAULT_SAVE_DPI=${POLLER_SAVE_DPI}
|
||||
volumes:
|
||||
influxdb3-data:
|
||||
influxdb3-plugins:
|
||||
grafana-storage:
|
||||
Reference in New Issue
Block a user