prometheus-node-exporter-lua: lower case bssid label value in wifi exporter
authorMartin Weinelt <hexa@darmstadt.ccc.de>
Tue, 29 Jun 2021 01:31:04 +0000 (03:31 +0200)
committerEtienne Champetier <champetier.etienne@gmail.com>
Tue, 6 Jul 2021 17:37:36 +0000 (13:37 -0400)
To allow cross matching bssids between different exporters we need to
use the same case, as label matching is case senstive.

Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/wifi.lua

index 05b0ba1fc9056030b41b17573637feec4c56448f..4b1e8f40208ac2e7eed5f25060364168d93395d0 100644 (file)
@@ -18,7 +18,7 @@ local function scrape()
         local labels = {
           channel = iw.channel(ifname),
           ssid = iw.ssid(ifname),
-          bssid = iw.bssid(ifname),
+          bssid = string.lower(iw.bssid(ifname)),
           mode = iw.mode(ifname),
           ifname = ifname,
           country = iw.country(ifname),