prometheus-node-exporter-lua: wifi / wifi_stations error when wireless network is disabled
Open
@champtar is already working on this.
Since Aug 16, 2019.
stale
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Maintainer: @champtar (me)
Environment: All
Description:
Wed Aug 14 16:46:53 2019 daemon.info prometheus-node-exporter-lua[11: /usr/lib/lua/prometheus-collectors/wifi.lua:16: bad argument #1 to 'type' (string expected, got nil)
Wed Aug 14 16:46:53 2019 daemon.info prometheus-node-exporter-lua[11: /usr/lib/lua/prometheus-collectors/wifi_stations.lua:29: bad argument #1 to 'type' (string expected, got nil)
Wed Aug 14 16:47:01 2019 daemon.info prometheus-node-exporter-lua[11: /usr/lib/lua/prometheus-collectors/wifi.lua:16: bad argument #1 to 'type' (string expected, got nil)
Wed Aug 14 16:47:01 2019 daemon.info prometheus-node-exporter-lua[11: /usr/lib/lua/prometheus-collectors/wifi_stations.lua:29: bad argument #1 to 'type' (string expected, got nil)
When interface is down, ifname is not present (which is normal)
root@OpenWrt:~# ubus call network.wireless status
{
"radio0": {
"up": false,
"pending": false,
"autostart": true,
"disabled": true,
"retry_setup_failed": false,
"config": {
"channel": "11",
"hwmode": "11g",
"path": "platform\/ar933x_wmac",
"htmode": "HT20",
"disabled": true
},
"interfaces": [
{
"section": "default_radio0",
"config": {
"mode": "ap",
"ssid": "OpenWrt",
"encryption": "none",
"network": [
"lan"
],
"mode": "ap"
}
}
]
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.