Add the Prometheus data source from within Grafana
Log in to Unifi and create the "service account"
I set mine up like this
Create the Unpoller stack By default, some guides says that "UP_UNIFI_CONTROLLER_0_URL" is supposed to be address:port, but that never worked for my UCG Ultra, removing the port did the trick for me.
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ["localhost:9090"]
- job_name: 'unifipoller'
scrape_interval: 30s
static_configs:
- targets: ['unpoller:9130']