From 2a479ddfcf66d2570217c4e88719f3145a99e4dc Mon Sep 17 00:00:00 2001 From: davidnewhall2 Date: Thu, 28 Nov 2019 21:08:53 -0800 Subject: [PATCH] bug fix --- promunifi/clients.go | 8 +------- promunifi/udm.go | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/promunifi/clients.go b/promunifi/clients.go index 4cc1fbb1..579a1648 100644 --- a/promunifi/clients.go +++ b/promunifi/clients.go @@ -39,10 +39,6 @@ type uclient struct { } func descClient(ns string) *uclient { - if ns += "_client_"; ns == "_client_" { - ns = "client_" - } - labels := []string{"name", "mac", "site_name", "gw_mac", "gw_name", "sw_mac", "sw_name", "vlan", "ip", "oui", "network"} labelWired := append([]string{"sw_port"}, labels...) labelWireless := append([]string{"ap_mac", "ap_name", "radio_name", "radio", "radio_proto", "channel", "essid", "bssid", "radio_desc"}, labels...) @@ -67,15 +63,13 @@ func descClient(ns string) *uclient { TxPower: prometheus.NewDesc(ns+"radio_transmit_power_dbm", "Client Transmit Power", labelWireless, wireless), TxRate: prometheus.NewDesc(ns+"radio_transmit_rate_bps", "Client Transmit Rate", labelWireless, wireless), WifiTxAttempts: prometheus.NewDesc(ns+"wifi_attempts_transmit_total", "Client Wifi Transmit Attempts", labelWireless, wireless), - WiredRxBytes: prometheus.NewDesc(ns+"wired_receive_bytes_total", "Client Wired Receive Bytes", labelWired, wired), WiredRxBytesR: prometheus.NewDesc(ns+"wired_receive_rate_bytes", "Client Wired Receive Data Rate", labelWired, wired), WiredRxPackets: prometheus.NewDesc(ns+"wired_receive_packets_total", "Client Wired Receive Packets", labelWired, wired), WiredTxBytes: prometheus.NewDesc(ns+"wired_transmit_bytes_total", "Client Wired Transmit Bytes", labelWired, wired), WiredTxBytesR: prometheus.NewDesc(ns+"wired_transmit_rate_bytes", "Client Wired Data Rate", labelWired, wired), WiredTxPackets: prometheus.NewDesc(ns+"wired_transmit_packets_total", "Client Wired Transmit Packets", labelWired, wired), - - Uptime: prometheus.NewDesc(ns+"uptime_seconds", "Client Uptime", labels, nil), + Uptime: prometheus.NewDesc(ns+"uptime_seconds", "Client Uptime", labels, nil), /* needs more "looking into" DpiStatsApp: prometheus.NewDesc(ns+"dpi_stats_app", "Client DPI Stats App", labels, nil), DpiStatsCat: prometheus.NewDesc(ns+"dpi_stats_cat", "Client DPI Stats Cat", labels, nil), diff --git a/promunifi/udm.go b/promunifi/udm.go index c3f62b3b..34b1adb3 100644 --- a/promunifi/udm.go +++ b/promunifi/udm.go @@ -36,7 +36,7 @@ type unifiDevice struct { } func descDevice(ns string) *unifiDevice { - labels := []string{"ip", "site_name", "mac", "model", "name", "serial", "type", "version"} + labels := []string{"ip", "type", "version", "site_name", "mac", "model", "name", "serial"} return &unifiDevice{ Uptime: prometheus.NewDesc(ns+"uptime", "Uptime", labels, nil), Temperature: prometheus.NewDesc(ns+"temperature_celsius", "Temperature", labels, nil),