mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
prometheus-node-exporter-lua: an unavaliable wifi interface may have stopped the scraper from functioning
Signed-off-by: Zoltan Haindrich <kirk@rxd.hu>
(cherry picked from commit 7bec619f53)
This commit is contained in:
committed by
Etienne Champetier
parent
0e69b14733
commit
928915f4a6
@@ -13,6 +13,7 @@ local function scrape()
|
||||
for dev, dev_table in pairs(status) do
|
||||
for _, intf in ipairs(dev_table['interfaces']) do
|
||||
local ifname = intf['ifname']
|
||||
if ifname ~= nil then
|
||||
local iw = iwinfo[iwinfo.type(ifname)]
|
||||
local labels = {
|
||||
channel = iw.channel(ifname),
|
||||
@@ -39,5 +40,6 @@ local function scrape()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return { scrape = scrape }
|
||||
|
||||
+2
@@ -26,6 +26,7 @@ local function scrape()
|
||||
for dev, dev_table in pairs(status) do
|
||||
for _, intf in ipairs(dev_table['interfaces']) do
|
||||
local ifname = intf['ifname']
|
||||
if ifname ~= nil then
|
||||
local iw = iwinfo[iwinfo.type(ifname)]
|
||||
local count = 0
|
||||
|
||||
@@ -65,5 +66,6 @@ local function scrape()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return { scrape = scrape }
|
||||
|
||||
Reference in New Issue
Block a user