charlie-haley / omada_exporter

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

omada_client_connected_total changed in latest omada version #79

Closed uzzitm closed 11 months ago

uzzitm commented 11 months ago

Hi,

In Omada controller version 5.9.31 the filed omada_client_connected_total no longer displays only 1 value, but separate values for each wifi mode (ac, ax, ng, etc)

This will result in the grafana dashboard to have multiple values when it should be only one total number

# TYPE omada_client_connected_total gauge omada_client_connected_total{connection_mode="wireless",site="***",site_id="641c7f4750ab2904d039be64",wifi_mode="802.11ac"} 7 omada_client_connected_total{connection_mode="wireless",site="***",site_id="641c7f4750ab2904d039be64",wifi_mode="802.11axa"} 1 omada_client_connected_total{connection_mode="wireless",site="***",site_id="641c7f4750ab2904d039be64",wifi_mode="802.11na"} 1 omada_client_connected_total{connection_mode="wireless",site="***",site_id="641c7f4750ab2904d039be64",wifi_mode="802.11ng"} 1

charlie-haley commented 11 months ago

Hey @uzzitm,

In the latest release some of the client total metrics were updated, this was to add extra dimensions to the metrics to allow people to filter clients based on their type as well as the wifi protocols connected.

If you're not interested in a breakdown on your dashboard, you can simply use sum(omada_client_connected_total) in your Prometheus query

uzzitm commented 11 months ago

thanks for the suggestion Charlie ! sum(omada_client_connected_total) works perfectly

uzzitm commented 11 months ago

fixed