Files
nixos/manifests/monitoring/unpoller.yaml
root 2d874d3969
buildbot/nix-eval Build done. (1 warning)
buildbot/nix-build Build done.
fix: two observability bugs from initial deployment
Fix 1 - UnPoller 404 on UDM Pro:
  Remove :8443 from UP_UNIFI_DEFAULT_URL. UniFi OS devices (UDM Pro,
  UDM, UXG, CloudKey) use a different API path and do NOT use port 8443.
  URL should be https://10.42.1.1 (no port); unpoller handles the
  /proxy/network path internally for UniFi OS devices.

Fix 2 - Grafana dashboards showing invalid datasource:
  Add uid = "prometheus" to the provisioned Prometheus datasource.
  Without an explicit UID, Grafana auto-generates one on first run.
  All dashboard JSON references datasource uid "prometheus" which
  only works if the provisioning explicitly sets that UID.
2026-03-25 12:37:29 -05:00

85 lines
1.9 KiB
YAML

---
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: unpoller-credentials
spec:
target:
name: unpoller-credentials
deletionPolicy: Delete
template:
type: Opaque
data:
username: "{{ .username }}"
password: "{{ .password }}"
secretStoreRef:
name: bitwarden-login
kind: ClusterSecretStore
data:
- secretKey: username
remoteRef:
key: "15bfc957-5de5-49b2-ab6c-b41800e71564"
property: username
- secretKey: password
remoteRef:
key: "15bfc957-5de5-49b2-ab6c-b41800e71564"
property: password
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: unpoller
namespace: monitoring
labels:
app: unpoller
spec:
replicas: 1
selector:
matchLabels:
app: unpoller
template:
metadata:
labels:
app: unpoller
spec:
containers:
- name: unpoller
image: ghcr.io/unpoller/unpoller:latest
ports:
- name: metrics
containerPort: 9130
env:
- name: UP_UNIFI_DEFAULT_URL
value: "https://10.42.1.1"
- name: UP_UNIFI_DEFAULT_VERIFY_SSL
value: "false"
- name: UP_UNIFI_DEFAULT_USER
valueFrom:
secretKeyRef:
name: unpoller-credentials
key: username
- name: UP_UNIFI_DEFAULT_PASS
valueFrom:
secretKeyRef:
name: unpoller-credentials
key: password
- name: UP_PROMETHEUS_DISABLE
value: "false"
- name: UP_INFLUXDB_DISABLE
value: "true"
---
apiVersion: v1
kind: Service
metadata:
name: unpoller
namespace: monitoring
labels:
app: unpoller
spec:
selector:
app: unpoller
ports:
- name: metrics
port: 9130
targetPort: 9130