Closed adriankirchner closed 5 years ago
Hi @adriankirchner Have you tried to run the code manually ? https://github.com/openwrt/packages/blob/master/admin/zabbix/files/wifi#L6
Also is zabbix running as root?
Hi @champtar,
running the code as root:
lua: (command line):1: bad argument #1 to 'type' (string expected, got nil)
stack traceback:
[C]: in function 'type'
(command line):1: in main chunk
[C]: ?
Zabbix Agent is running as user zabbix
.
Output of iwinfo
:
wlan0 ESSID: unknown
Access Point: 00:00:00:00:00:00
Mode: Client Channel: unknown (unknown)
Tx-Power: 0 dBm Link Quality: unknown/70
Signal: unknown Noise: unknown
Bit Rate: unknown
Encryption: unknown
Type: nl80211 HW Mode(s): 802.11bgnac
Hardware: 168C:0050 0000:0000 [Generic MAC80211]
TX power offset: unknown
Frequency offset: unknown
Supports VAPs: yes PHY name: phy0
wlan1 ESSID: unknown
Access Point: 00:00:00:00:00:00
Mode: Client Channel: unknown (unknown)
Tx-Power: 0 dBm Link Quality: unknown/70
Signal: unknown Noise: unknown
Bit Rate: unknown
Encryption: unknown
Type: nl80211 HW Mode(s): 802.11bgn
Hardware: unknown [Generic MAC80211]
TX power offset: unknown
Frequency offset: unknown
Supports VAPs: yes PHY name: phy1
wlan2 ESSID: unknown
Access Point: 00:00:00:00:00:00
Mode: Client Channel: unknown (unknown)
Tx-Power: 0 dBm Link Quality: unknown/70
Signal: unknown Noise: unknown
Bit Rate: unknown
Encryption: unknown
Type: nl80211 HW Mode(s): 802.11nac
Hardware: unknown [Generic MAC80211]
TX power offset: unknown
Frequency offset: unknown
Supports VAPs: yes PHY name: phy2
Since Zabbix Agent is running as user zabbix
it need an ubus ACL (based on this post):
File: /usr/share/acl.d/zabbix-agent.json
{
"user": "zabbix",
"access": {
"network.wireless": {
"methods": [ "status" ]
}
}
}
Reload ubus with killall -HUP ubusd
@adriankirchner do you want to try to create a PR to add this ACL ?
Would love to but I'm not sure if I'll find time in the near future to learn stuff like building stuff locally on my openwrt device and understanding how opkg works (eg. for ubus reloading). Maybe you can get me some hints.
fixed with https://github.com/openwrt/packages/commit/1afcc61601cb1e4c6238525f5d07c20e66e32ad9 Thanks @adriankirchner
@adriankirchner i've also reimplemented network discovery using ubus, see https://github.com/openwrt/packages/commit/5d1aa99648bc2e22d7db7cc12926ea79e130bb04
Nice one!
So did this fix actually work for you @adriankirchner? I am still having this issue today on a fresh install of 23.05.
@troffasky I'm not using the devices anymore, but if I recall correctly, the fix worked flawlessly.
Maintainer: @champtar Environment: armv7l, Cisco Meraki MR33, OpenWrt SNAPSHOT r6168+17-4979a72e37 Description: After installing
zabbix-extra-wifi
viaopkg
and restartingzabbix-agentd
, the keywifi.ifdiscovery
for wifi discovery is not working due to a lua error:list of installed packages: