charlie-haley / omada_exporter

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

Dashboard does not display data for devices if they are renamed #94

Open gregorskii opened 4 months ago

gregorskii commented 4 months ago

Awesome plugin, thank you!

One small issue, the dashboard does not work properly if the devices are renamed from their mac address.

omada_device_cpu_percentage{device="Gateway",device_type="gateway",ip="10.10.10.1",mac="40-ED-00-6E-AA-E7",model="ER605",site="Cafe Rosalia",site_id="660e30ff0f212801b19ecd33",version="2.2.4"} 2
omada_device_cpu_percentage{device="Living Switch",device_type="switch",ip="10.10.10.23",mac="E4-FA-C4-B2-6E-27",model="SG2008",site="Cafe Rosalia",site_id="660e30ff0f212801b19ecd33",version="4.20.1"} 0
omada_device_cpu_percentage{device="Office Switch",device_type="switch",ip="10.10.10.24",mac="E4-FA-C4-B2-6E-01",model="SG2008",site="Cafe Rosalia",site_id="660e30ff0f212801b19ecd33",version="4.20.1"} 0
omada_device_cpu_percentage{device="Router Switch",device_type="switch",ip="10.10.10.45",mac="98-25-4A-63-F8-EF",model="SG2008P",site="Cafe Rosalia",site_id="660e30ff0f212801b19ecd33",version="3.20.1"} 1
Screenshot 2024-04-29 at 11 11 28 PM Screenshot 2024-04-29 at 11 11 50 PM Screenshot 2024-04-29 at 11 12 36 PM

I can likely work through this on the dashboard with more time but in case anyone runs across this it may be desired to fix it. Or update the dash with an alternate?