Add UnPoller for UniFi network metrics #298

Merged
eblume merged 8 commits from feature/unpoller into main 2026-03-16 15:52:45 -07:00
Showing only changes of commit a39b9a4bf6 - Show all commits

Fix UnPoller dashboard datasource UIDs, drop DPI dashboard

Upstream dashboards hardcode a different Prometheus datasource UID.
Patch them at download time to match our 'prometheus' UID. Remove the
Client DPI dashboard since DPI is not enabled on the UX7.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Erich Blume 2026-03-16 15:48:24 -07:00

View file

@ -103,7 +103,6 @@ spec:
DEST="/tmp/dashboards/UniFi"
mkdir -p "$DEST"
for f in \
"UniFi-Poller_ Client DPI - Prometheus.json" \
"UniFi-Poller_ Client Insights - Prometheus.json" \
"UniFi-Poller_ Network Sites - Prometheus.json" \
"UniFi-Poller_ UAP Insights - Prometheus.json" \
@ -112,6 +111,9 @@ spec:
; do
wget -q -O "$DEST/$f" "$BASE_URL/$(echo "$f" | sed 's/ /%20/g')"
done
# Fix datasource UIDs to match our Prometheus instance
sed -i 's/"uid": *"bdkj55oguty4gd"/"uid": "prometheus"/g' "$DEST"/*.json
sed -i 's/"uid": *"\${DS_PROMETHEUS}"/"uid": "prometheus"/g' "$DEST"/*.json
echo "Fetched $(ls "$DEST" | wc -l) UnPoller dashboards"
securityContext:
allowPrivilegeEscalation: false