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

KeyTypeDefaultDescription
affinityobject{}
config.influxdb.dbstring"unifi"
config.influxdb.disableboolfalseDisable prometheus output
config.influxdb.intervalstring"30s"
config.influxdb.passstring"unifipoller"Be sure to create this database.
config.influxdb.urlstring"http://127.0.0.1:8086"InfluxDB does not require auth by default, so the user/password are probably unimportant.
config.influxdb.userstring"unifipoller"
config.influxdb.verify_sslboolfalseThe 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.debugboolfalseTurns 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.pluginslist[]Load dynamic plugins. Advanced use; only sample mysql plugin provided by default.
config.poller.quietboolfalseTurns off per-interval logs. Only startup and error logs will be emitted. Recommend enabling debug with this setting for better error logging.
config.prometheus.disableboolfalseDisable prometheus output
config.prometheus.http_listenstring"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_errorsboolfalse
config.unifi.controllerslist[]Repeat any controllers like default above
config.unifi.defaultsobject{"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.passstring"unifipoller"Password to talk to unifi
config.unifi.defaults.rolestring"main controller"Username to talk to unifi
config.unifi.defaults.save_dpiboolfalseEnable 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_idsboolfalseEnable 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_sitesbooltrueEnable 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.siteslist["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.urlstring"https://127.0.0.1:8443"Url to talk to unifi
config.unifi.defaults.verify_sslboolfalseIf 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.dynamicboolfalseSetting 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.
fullnameOverridestring""
image.pullPolicystring"IfNotPresent"
image.repositorystring"golift/unifi-poller"
image.tagstring"2.0.0"
imagePullSecretslist[]
ingress.annotationsobject{}
ingress.enabledboolfalse
ingress.hosts[0].hoststring"chart-example.local"
ingress.hosts[0].pathslist[]
ingress.tlslist[]
nameOverridestring""
nodeSelectorobject{}
pod.annotationsobject{}
pod.labelsobject{}
podSecurityContextobject{}
replicaCountint1
resourcesobject{}
securityContextobject{}
service.annotationsobject{}
service.portint9130
service.typestring"ClusterIP"
serviceAccount.createbooltrue
serviceAccount.namestringnil
tolerationslist[]

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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartunifi-poller is pinned at v0.1.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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