charlie-haley / omada_exporter

Prometheus Exporter for TP-Link Omada Controller SDN.
MIT License
87 stars 14 forks source link

🐛 fix duplicate metrics being registered #61

Closed charlie-haley closed 1 year ago

charlie-haley commented 1 year ago

Fixes https://github.com/charlie-haley/omada_exporter/issues/55

For some reason, the Omada API returns duplicate ports for some devices, this causes issues with registering Prometheus metrics. A simple, but hacky fix to simply remove duplicate ports before iterating.