File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ local function scrape()
1010 local u = ubus .connect ()
1111 local status = u :call (" network.wireless" , " status" , {})
1212
13+ if not status then
14+ return
15+ end
16+
1317 for dev , dev_table in pairs (status ) do
1418 for _ , intf in ipairs (dev_table [' interfaces' ]) do
1519 local ifname = intf [' ifname' ]
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ local function scrape()
2323 local u = ubus .connect ()
2424 local status = u :call (" network.wireless" , " status" , {})
2525
26+ if not status then
27+ return
28+ end
29+
2630 for dev , dev_table in pairs (status ) do
2731 for _ , intf in ipairs (dev_table [' interfaces' ]) do
2832 local ifname = intf [' ifname' ]
You can’t perform that action at this time.
0 commit comments