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>
This commit is contained in:
Erich Blume 2026-03-16 15:48:24 -07:00
commit a39b9a4bf6

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