summaryrefslogtreecommitdiff
path: root/utils/prometheus-node-exporter-lua
diff options
context:
space:
mode:
authorNick Hainke <vincent@systemli.org>2021-02-15 10:55:26 +0100
committerEtienne Champetier <champetier.etienne@gmail.com>2021-02-15 08:39:09 -0500
commit495cdbb39d0b5c332c57aab8011541842d163cd2 (patch)
tree74d875ce8ff565331c5c2369928300b804962dd8 /utils/prometheus-node-exporter-lua
parentac4cbab7d8b0a4abd0c2fc667d00c77585d103ed (diff)
prometheus-node-exporter-lua: fix wifi
The "get_wifi_interfaces" function is not returning the wifi interface names. This causes the bug #14625. Fix the "get_wifi_interfaces" function. Signed-off-by: Nick Hainke <vincent@systemli.org>
Diffstat (limited to 'utils/prometheus-node-exporter-lua')
-rw-r--r--utils/prometheus-node-exporter-lua/Makefile2
-rw-r--r--utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/utils/prometheus-node-exporter-lua/Makefile b/utils/prometheus-node-exporter-lua/Makefile
index d094b831f..26e7e3946 100644
--- a/utils/prometheus-node-exporter-lua/Makefile
+++ b/utils/prometheus-node-exporter-lua/Makefile
@@ -4,7 +4,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=prometheus-node-exporter-lua
-PKG_VERSION:=2021.01.27
+PKG_VERSION:=2021.02.15
PKG_RELEASE:=1
PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
diff --git a/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua b/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua
index 47ae9a5c5..5e141e6bc 100644
--- a/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua
+++ b/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/hostapd_stations.lua
@@ -6,9 +6,9 @@ local function get_wifi_interfaces()
local status = u:call("network.wireless", "status", {})
local interfaces = {}
- for dev, dev_table in pairs(status) do
+ for _, dev_table in pairs(status) do
for _, intf in ipairs(dev_table['interfaces']) do
- table.insert(interfaces, intf['config']['ifname'])
+ table.insert(interfaces, intf['ifname'])
end
end