Modify

Opened 4 years ago

Closed 4 years ago

#14817 closed defect (duplicate)

zabbix-extra-wifi & zabbix-extra-mac80211

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Cc:

Description

The discovery rule from zabbix-extra-wifi (https://dev.openwrt.org/browser/packages/admin/zabbix/files/wifi#L6 doesn't work.

root@router:/etc/zabbix_agentd.conf.d# sh /tmp/wifi.sh
lua: (command line):1: bad argument #1 to 'type' (string expected, got nil)
stack traceback:

[C]: in function 'foreach'
(command line):1: in main chunk
[C]: ?

root@router:/etc/zabbix_agentd.conf.d# cat /tmp/wifi.sh
#!/bin/sh

lua -l uci -l iwinfo -e 'x = uci.cursor(nil, "/var/state");list = "{\"data\":[";x:foreach("wireless", "wifi-iface", function(s) list=list.."{\"{#IF}\":\""..s.ifname.."\", \"{#MODE}\":\""..s.mode.."\", \"{#SSID}\":\""..s.ssid.."\", \"{#NET}\":\""..s.network.."\", \"{#DEV}\":\""..s.device.."\", \"{#ENC}\":\""..(s.encryption or "?").."\", \"{#TYPE}\":\""..x:get("wireless",s.device,"type").."\", \"{#HWMODE}\":\""..(x:get("wireless",s.device,"hwmode") or "?").."\", \"{#CHANNEL}\":\""..x:get("wireless",s.device,"channel").."\", \"{#BSSID}\":\""..iwinfo[iwinfo.type(s.ifname)].bssid(s.ifname).."\"}," end); list=string.gsub(list,",$",""); print(list.."]}")'

The zabbix-extra-mac80211 discovery rule (https://dev.openwrt.org/browser/packages/admin/zabbix/files/mac80211#L10) requires the zabbix user to be able to read files in /sys/kernel/debug/ieee80211/.

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by swalker

  • Resolution set to duplicate
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.