From a45c702baa1c5e913ac6561ef0e0465b8bd780ce Mon Sep 17 00:00:00 2001 From: Alex Tomlins Date: Sun, 7 Apr 2019 14:08:31 +0100 Subject: [PATCH] prometheus-node-exporter-lua: wifi packets should be a counter These output a count of the number of packets transmitted/received, so should be tracked as a counter. As it stands, promtool is warning that these shouldn't be named ending _total if they're a gauge. Signed-off-by: Alex Tomlins --- .../files/usr/lib/lua/prometheus-collectors/wifi_stations.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/wifi_stations.lua b/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/wifi_stations.lua index 19b5b1eab..d9095a969 100644 --- a/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/wifi_stations.lua +++ b/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/wifi_stations.lua @@ -3,8 +3,8 @@ local iwinfo = require "iwinfo" local function scrape() local metric_wifi_station_signal = metric("wifi_station_signal_dbm","gauge") - local metric_wifi_station_tx_packets = metric("wifi_station_tx_packets_total","gauge") - local metric_wifi_station_rx_packets = metric("wifi_station_rx_packets_total","gauge") + local metric_wifi_station_tx_packets = metric("wifi_station_tx_packets_total","counter") + local metric_wifi_station_rx_packets = metric("wifi_station_rx_packets_total","counter") local u = ubus.connect() local status = u:call("network.wireless", "status", {})