unifi-poller
by halkeye
Helm chartv0.1.2App 2.0
Collect ALL UniFi Controller, Site, Device & Client Data - Export to InfluxDB or Prometheus
About this chart
unifi-poller
Collect ALL UniFi Controller, Site, Device & Client Data - Export to InfluxDB or Prometheus
Current chart version is 0.1.2
Source code can be found here
Chart Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | |
| config.influxdb.db | string | "unifi" | |
| config.influxdb.disable | bool | false | Disable prometheus output |
| config.influxdb.interval | string | "30s" | |
| config.influxdb.pass | string | "unifipoller" | Be sure to create this database. |
| config.influxdb.url | string | "http://127.0.0.1:8086" | InfluxDB does not require auth by default, so the user/password are probably unimportant. |
| config.influxdb.user | string | "unifipoller" | |
| config.influxdb.verify_ssl | bool | false | The UniFi Controller only updates traffic stats about every 30 seconds. Setting this to something lower may lead to "zeros" in your data. If you're getting zeros now, set this to "1m" |
| config.poller.debug | bool | false | Turns on line numbers, microsecond logging, and a per-device log. The default is false, but I personally leave this on at home (four devices). This may be noisy if you have a lot of devices. It adds one line per device. |
| config.poller.plugins | list | [] | Load dynamic plugins. Advanced use; only sample mysql plugin provided by default. |
| config.poller.quiet | bool | false | Turns off per-interval logs. Only startup and error logs will be emitted. Recommend enabling debug with this setting for better error logging. |
| config.prometheus.disable | bool | false | Disable prometheus output |
| config.prometheus.http_listen | string | "0.0.0.0:9130" | This controls on which ip and port /metrics is exported when mode is "prometheus". This has no effect in other modes. Must contain a colon and port. |
| config.prometheus.report_errors | bool | false | |
| config.unifi.controllers | list | [] | Repeat any controllers like default above |
| config.unifi.defaults | object | {"pass":"unifipoller","role":"main controller","save_dpi":false,"save_ids":false,"save_sites":true,"sites":["all"],"url":"https://127.0.0.1:8443","user":"unifipoller","verify_ssl":false} | The following section contains the default credentials/configuration for any dynamic controller (see above section), or the primary controller if you do not provide one and dynamic is disabled. In other words, you can just add your controller here and delete the following section. |
| config.unifi.defaults.pass | string | "unifipoller" | Password to talk to unifi |
| config.unifi.defaults.role | string | "main controller" | Username to talk to unifi |
| config.unifi.defaults.save_dpi | bool | false | Enable collection of Deep Packet Inspection data. This data breaks down traffic types for each client and site, it powers a dedicated DPI dashboard. Enabling this adds roughly 150 data points per client. That's 6000 metrics for 40 clients. This adds a little bit of poller run time per interval and causes more API requests to your controller(s). Don't let these "cons" sway you: it's cool data. Please provide feedback on your experience with this feature. |
| config.unifi.defaults.save_ids | bool | false | Enable collection of Intrusion Detection System Data (InfluxDB only). Only useful if IDS or IPS are enabled on one of the sites. |
| config.unifi.defaults.save_sites | bool | true | Enable collection of site data. This data powers the Network Sites dashboard. It's not valuable to everyone and setting this to false will save resources. |
| config.unifi.defaults.sites | list | ["all"] | If the controller has more than one site, specify which sites to poll here. Set this to ["default"] to poll only the first site on the controller. A setting of ["all"] will poll all sites; this works if you only have 1 site too. |
| config.unifi.defaults.url | string | "https://127.0.0.1:8443" | Url to talk to unifi |
| config.unifi.defaults.verify_ssl | bool | false | If your UniFi controller has a valid SSL certificate (like lets encrypt), you can enable this option to validate it. Otherwise, any SSL certificate is valid. If you don't know if you have a valid SSL cert, then you don't have one |
| config.unifi.dynamic | bool | false | Setting this to true and providing default credentials allows you to skip configuring controllers in this config file. Instead you configure them in your prometheus.yml config. Prometheus then sends the controller URL to unifi-poller when it performs the scrape. This is useful if you have many, or changing controllers. Most people can leave this off. See wiki for more. |
| fullnameOverride | string | "" | |
| image.pullPolicy | string | "IfNotPresent" | |
| image.repository | string | "golift/unifi-poller" | |
| image.tag | string | "2.0.0" | |
| imagePullSecrets | list | [] | |
| ingress.annotations | object | {} | |
| ingress.enabled | bool | false | |
| ingress.hosts[0].host | string | "chart-example.local" | |
| ingress.hosts[0].paths | list | [] | |
| ingress.tls | list | [] | |
| nameOverride | string | "" | |
| nodeSelector | object | {} | |
| pod.annotations | object | {} | |
| pod.labels | object | {} | |
| podSecurityContext | object | {} | |
| replicaCount | int | 1 | |
| resources | object | {} | |
| securityContext | object | {} | |
| service.annotations | object | {} | |
| service.port | int | 9130 | |
| service.type | string | "ClusterIP" | |
| serviceAccount.create | bool | true | |
| serviceAccount.name | string | nil | |
| tolerations | list | [] |
Deploy unifi-poller with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has unifi-poller on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartunifi-poller is pinned at v0.1.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply