Browse Source

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 <alex@tomlins.org.uk>
lilik-openwrt-22.03
Alex Tomlins 5 years ago
parent
commit
a45c702baa
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/wifi_stations.lua

+ 2
- 2
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/wifi_stations.lua View File

@ -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", {})


Loading…
Cancel
Save