unpoller_unpoller/pkg/influxunifi
Cody Lee c61d2651a2
Enhance InfluxDB and Datadog UBB outputs with comprehensive metrics
This change significantly expands the metrics exported for UBB devices
to InfluxDB and Datadog, matching the comprehensive coverage added to
the Prometheus output.

Changes to InfluxDB (pkg/influxunifi/ubb.go):
- Added batchUBBstats() to export comprehensive statistics separated
  by radio (total, wifi0, terra2, user-wifi0, user-terra2)
- Added VAP table export via processVAPTable()
- Added Radio table export via processRadTable()
- Added P2P stats (rx_rate, tx_rate, throughput)
- Added link quality metrics (link_quality, link_quality_current,
  link_capacity)
- Comprehensive stats exported to new "ubb_stats" table with full
  breakdown of traffic per radio

Changes to Datadog (pkg/datadogunifi/ubb.go):
- Added batchUBBstats() to export comprehensive statistics separated
  by radio (total, wifi0, terra2, user-wifi0, user-terra2)
- Added VAP table export via processVAPTable()
- Added Radio table export via processRadTable()
- Added P2P stats (rx_rate, tx_rate, throughput)
- Added link quality metrics (link_quality, link_quality_current,
  link_capacity)
- Comprehensive stats exported with namespace "ubb.stats"

All implementations now fully support:
- 5GHz radio (wifi0) metrics
- 60GHz radio (terra2/ad) metrics - Full 802.11ad support!
- Per-radio RX/TX packets, bytes, errors, dropped, retries
- User-specific metrics for each radio
- Interface-specific metrics (ath0 for 5GHz, wlan0 for 60GHz)
- Point-to-point link statistics and quality metrics

Fixes: #409

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-09 11:04:35 -06:00
..
LICENSE move to the pkg dir 2022-12-02 20:46:16 -05:00
README.md update per PR suggestions 2022-12-05 16:06:30 -06:00
alarms.go painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00
clients.go painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00
events.go painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00
influxdb.go fix dd client interface change, update deprecated context lib in influxdb 2025-12-03 11:51:40 -06:00
integration_test.go fix linting 2025-12-03 11:40:21 -06:00
integration_test_expectations.yaml Enhance InfluxDB and Datadog UBB outputs with comprehensive metrics 2025-12-09 11:04:35 -06:00
logger.go add integration test guard; 2023-07-31 14:40:33 -05:00
pdu.go painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00
report.go fix linting 2025-12-03 11:40:21 -06:00
site.go painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00
uap.go painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00
ubb.go Enhance InfluxDB and Datadog UBB outputs with comprehensive metrics 2025-12-09 11:04:35 -06:00
uci.go fixes metrics prefix names for ubb and uci devices 2025-01-15 15:50:47 -06:00
udm.go painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00
usg.go adds device uplink stats for issue #585 2025-01-02 12:41:34 -06:00
usw.go adds device uplink stats for issue #585 2025-01-02 12:41:34 -06:00
uxg.go painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00

README.md

UnPoller InfluxDB Plugin

Collects UniFi data from a UniFi controller using the API.

This is meant for InfluxDB users 1.8+ and 2.x series.

Configuration

InfluxDB 1.8+, 2.x

Note the use of auth_token to enable this mode.

influxdb:
  disable: false
  # How often to poll UniFi and report to Datadog.
  interval: "2m"
  # the influxdb url to post data
  url: http://somehost:1234
  # the secret auth token, this enables InfluxDB 1.8, 2.x compatibility.
  auth_token: somesecret
  # the influxdb org
  org: my-org
  # the influxdb bucket
  bucket: my-bucket
  # how many points to batch write per flush.
  batch_size: 20

InfluxDB pre 1.8

Note the lack of auth_token to enable this mode.

influxdb:
  disable: false
  # How often to poll UniFi and report to Datadog.
  interval: "2m"
  # the influxdb url to post data
  url: http://somehost:1234
  # the database
  db: mydb
  # the influxdb api user
  user: unifi
  # the influxdb api password 
  pass: supersecret