I have too many devices and thus even in the normal openwrt 22 cli, ubus call network.device status throws a time out.
Entirely my problem, but through this time out
|
local network_status = ubus:call('network.device', 'status', {}) |
gets an unexpected assignment and by this
|
for name, interface in pairs(network_status) do |
fails.
This in turn results in an empty report in this in a HTTP 400 from the openwisp server.
The solution could be to either check every variable, before pairs is used on it and omit this part in the report, if there should be an error, or to abort the whole script, if ubus:call has an error.
I have too many devices and thus even in the normal openwrt 22 cli,
ubus call network.device statusthrows a time out.Entirely my problem, but through this time out
openwrt-openwisp-monitoring/openwisp-monitoring/files/sbin/netjson-monitoring.lua
Line 65 in 6709f35
openwrt-openwisp-monitoring/openwisp-monitoring/files/sbin/netjson-monitoring.lua
Line 123 in 6709f35
This in turn results in an empty report in this in a HTTP 400 from the openwisp server.
The solution could be to either check every variable, before
pairsis used on it and omit this part in the report, if there should be an error, or to abort the whole script, ifubus:callhas an error.