Closed hafkensite closed 3 years ago
Did a quick hack to see if caps-man metrics could work (issue #89) Not sure if I did everything by the book, open for feedback.
Example output
# HELP mikrotik_capsman_station_rx_bytes rx_bytes # TYPE mikrotik_capsman_station_rx_bytes counter mikrotik_capsman_station_rx_bytes{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="20:4E:F6:7F:C1:AC",name="my_router",ssid="hafkensite"} 1.117645e+06 mikrotik_capsman_station_rx_bytes{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="48:3F:DA:97:FD:5E",name="my_router",ssid="hafkensite"} 1.1575503e+07 mikrotik_capsman_station_rx_bytes{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="60:01:94:D9:18:EC",name="my_router",ssid="hafkensite"} 1.1492928e+07 mikrotik_capsman_station_rx_bytes{address="192.168.2.254",interface="Zolder 2.4Ghz",mac_address="8C:AA:B5:61:89:D1",name="my_router",ssid="hafkensite"} 1.4262062e+07 mikrotik_capsman_station_rx_bytes{address="192.168.2.254",interface="Zolder 2.4Ghz",mac_address="8C:AA:B5:61:E9:D4",name="my_router",ssid="hafkensite"} 1.4381696e+07 mikrotik_capsman_station_rx_bytes{address="192.168.2.254",interface="Zolder 5ghz",mac_address="C2:7E:0E:2B:EC:27",name="my_router",ssid="5afkenscheid"} 1.3092424e+07 # HELP mikrotik_capsman_station_rx_packets rx_packets # TYPE mikrotik_capsman_station_rx_packets counter mikrotik_capsman_station_rx_packets{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="20:4E:F6:7F:C1:AC",name="my_router",ssid="hafkensite"} 12347 mikrotik_capsman_station_rx_packets{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="48:3F:DA:97:FD:5E",name="my_router",ssid="hafkensite"} 173358 mikrotik_capsman_station_rx_packets{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="60:01:94:D9:18:EC",name="my_router",ssid="hafkensite"} 173310 mikrotik_capsman_station_rx_packets{address="192.168.2.254",interface="Zolder 2.4Ghz",mac_address="8C:AA:B5:61:89:D1",name="my_router",ssid="hafkensite"} 179512 mikrotik_capsman_station_rx_packets{address="192.168.2.254",interface="Zolder 2.4Ghz",mac_address="8C:AA:B5:61:E9:D4",name="my_router",ssid="hafkensite"} 180021 mikrotik_capsman_station_rx_packets{address="192.168.2.254",interface="Zolder 5ghz",mac_address="C2:7E:0E:2B:EC:27",name="my_router",ssid="5afkenscheid"} 154774 # HELP mikrotik_capsman_station_rx_signal rx-signal # TYPE mikrotik_capsman_station_rx_signal gauge mikrotik_capsman_station_rx_signal{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="20:4E:F6:7F:C1:AC",name="my_router",ssid="hafkensite"} -80 mikrotik_capsman_station_rx_signal{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="48:3F:DA:97:FD:5E",name="my_router",ssid="hafkensite"} -59 mikrotik_capsman_station_rx_signal{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="60:01:94:D9:18:EC",name="my_router",ssid="hafkensite"} -50 mikrotik_capsman_station_rx_signal{address="192.168.2.254",interface="Zolder 2.4Ghz",mac_address="8C:AA:B5:61:89:D1",name="my_router",ssid="hafkensite"} -66 mikrotik_capsman_station_rx_signal{address="192.168.2.254",interface="Zolder 2.4Ghz",mac_address="8C:AA:B5:61:E9:D4",name="my_router",ssid="hafkensite"} -61 mikrotik_capsman_station_rx_signal{address="192.168.2.254",interface="Zolder 5ghz",mac_address="C2:7E:0E:2B:EC:27",name="my_router",ssid="5afkenscheid"} -48 # HELP mikrotik_capsman_station_tx_bytes tx_bytes # TYPE mikrotik_capsman_station_tx_bytes counter mikrotik_capsman_station_tx_bytes{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="20:4E:F6:7F:C1:AC",name="my_router",ssid="hafkensite"} 590218 mikrotik_capsman_station_tx_bytes{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="48:3F:DA:97:FD:5E",name="my_router",ssid="hafkensite"} 7.932877e+06 mikrotik_capsman_station_tx_bytes{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="60:01:94:D9:18:EC",name="my_router",ssid="hafkensite"} 7.933468e+06 mikrotik_capsman_station_tx_bytes{address="192.168.2.254",interface="Zolder 2.4Ghz",mac_address="8C:AA:B5:61:89:D1",name="my_router",ssid="hafkensite"} 8.284268e+06 mikrotik_capsman_station_tx_bytes{address="192.168.2.254",interface="Zolder 2.4Ghz",mac_address="8C:AA:B5:61:E9:D4",name="my_router",ssid="hafkensite"} 8.302159e+06 mikrotik_capsman_station_tx_bytes{address="192.168.2.254",interface="Zolder 5ghz",mac_address="C2:7E:0E:2B:EC:27",name="my_router",ssid="5afkenscheid"} 3.73855865e+08 # HELP mikrotik_capsman_station_tx_packets tx_packets # TYPE mikrotik_capsman_station_tx_packets counter mikrotik_capsman_station_tx_packets{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="20:4E:F6:7F:C1:AC",name="my_router",ssid="hafkensite"} 10278 mikrotik_capsman_station_tx_packets{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="48:3F:DA:97:FD:5E",name="my_router",ssid="hafkensite"} 128402 mikrotik_capsman_station_tx_packets{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="60:01:94:D9:18:EC",name="my_router",ssid="hafkensite"} 128282 mikrotik_capsman_station_tx_packets{address="192.168.2.254",interface="Zolder 2.4Ghz",mac_address="8C:AA:B5:61:89:D1",name="my_router",ssid="hafkensite"} 134257 mikrotik_capsman_station_tx_packets{address="192.168.2.254",interface="Zolder 2.4Ghz",mac_address="8C:AA:B5:61:E9:D4",name="my_router",ssid="hafkensite"} 134513 mikrotik_capsman_station_tx_packets{address="192.168.2.254",interface="Zolder 5ghz",mac_address="C2:7E:0E:2B:EC:27",name="my_router",ssid="5afkenscheid"} 270975 # HELP mikrotik_capsman_station_uptime uptime # TYPE mikrotik_capsman_station_uptime gauge mikrotik_capsman_station_uptime{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="20:4E:F6:7F:C1:AC",name="my_router",ssid="hafkensite"} 179954.27 mikrotik_capsman_station_uptime{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="48:3F:DA:97:FD:5E",name="my_router",ssid="hafkensite"} 1.93055642e+06 mikrotik_capsman_station_uptime{address="192.168.2.254",interface="Router 2.4Ghz",mac_address="60:01:94:D9:18:EC",name="my_router",ssid="hafkensite"} 1.93055642e+06 mikrotik_capsman_station_uptime{address="192.168.2.254",interface="Zolder 2.4Ghz",mac_address="8C:AA:B5:61:89:D1",name="my_router",ssid="hafkensite"} 1.93055516e+06 mikrotik_capsman_station_uptime{address="192.168.2.254",interface="Zolder 2.4Ghz",mac_address="8C:AA:B5:61:E9:D4",name="my_router",ssid="hafkensite"} 1.93055653e+06 mikrotik_capsman_station_uptime{address="192.168.2.254",interface="Zolder 5ghz",mac_address="C2:7E:0E:2B:EC:27",name="my_router",ssid="5afkenscheid"} 3966.52
Thanks for the PR @hafkensite
Did a quick hack to see if caps-man metrics could work (issue #89) Not sure if I did everything by the book, open for feedback.
Example output