Files
unpoller-unpoller-3/pkg/influxunifi
Cody Lee a00aeb2eb5 Add byte counters for InfluxDB and Prometheus outputs (issue #350)
Track the number of bytes written per request for both InfluxDB and Prometheus outputs.

InfluxDB:
- Added bytesT counter constant
- Implemented calculateMetricBytes() to estimate line protocol size
- Updated batchV1() and batchV2() to count bytes per point
- Updated log output to display bytes written

Prometheus:
- Added Bytes field to Report struct
- Updated export() to calculate approximate metric byte size
- Updated log output to display bytes written

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-11 10:55:33 -06:00
..
2025-12-03 11:40:21 -06:00
2022-12-02 20:46:16 -05:00
2023-07-31 14:40:33 -05:00
2024-12-31 14:44:10 -06:00
2022-12-05 16:06:30 -06:00
2024-12-31 14:44:10 -06:00
2024-12-31 14:44:10 -06:00
2024-12-31 14:44:10 -06:00
2025-01-02 12:41:34 -06:00
2025-01-02 12:41:34 -06:00
2024-12-31 14:44:10 -06:00

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