unpoller_unpoller/pkg/promunifi
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
..
LICENSE move to the pkg dir 2022-12-02 20:46:16 -05:00
README.md move to the pkg dir 2022-12-02 20:46:16 -05:00
clients.go painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00
collector.go Add byte counters for InfluxDB and Prometheus outputs (issue #350) 2025-12-11 10:55:33 -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 Add byte counters for InfluxDB and Prometheus outputs (issue #350) 2025-12-11 10:55:33 -06:00
site.go painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00
speedtest.go Fix multi-WAN speed test reporting (issue #841) 2025-12-09 16:46:14 -06:00
uap.go painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00
ubb.go Refactor Prometheus UBB label construction to use append 2025-12-09 11:12:00 -06:00
uci.go adds in UBB & UCI support 2025-01-02 08:57: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 painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00
uxg.go painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00

README.md

prometheus

This package provides the interface to turn UniFi measurements into prometheus exported metrics. Requires the poller package for actual UniFi data collection.