mirror of
https://github.com/limosek/zaf-plugins.git
synced 2025-01-21 07:25:56 +01:00
Repaired iwx to work with openwrt
This commit is contained in:
parent
e2cc70596c
commit
c598e31aaa
@ -10,7 +10,7 @@ Web: https://github.com/limosek/zaf-plugins
|
|||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
Depends-dpkg: dash curl
|
Depends-dpkg: dash curl
|
||||||
Depens-opkg: busybox curl
|
Depens-opkg: busybox curl jshn
|
||||||
Depends-rpm: curl
|
Depends-rpm: curl
|
||||||
Depends-bin: curl ps iw
|
Depends-bin: curl ps iw
|
||||||
|
|
||||||
@ -49,6 +49,14 @@ Parameters: dev
|
|||||||
Cmd: wifi_clients_discovery $1
|
Cmd: wifi_clients_discovery $1
|
||||||
/Item
|
/Item
|
||||||
|
|
||||||
|
Item neigh_discovery:
|
||||||
|
Description::
|
||||||
|
Discovery of wireless neighbours
|
||||||
|
::
|
||||||
|
Parameters: dev
|
||||||
|
Cmd: wifi_neigh_discovery $1
|
||||||
|
/Item
|
||||||
|
|
||||||
Item client_signal:
|
Item client_signal:
|
||||||
Description::
|
Description::
|
||||||
Signal level of client
|
Signal level of client
|
||||||
|
@ -1,26 +1,33 @@
|
|||||||
|
|
||||||
|
|
||||||
wifi_ifphylist_openwrt() {
|
wifi_ifphylist_openwrt() {
|
||||||
local devs phys p ifname ifindex i
|
local devs phys p ifname ifindex i
|
||||||
|
|
||||||
json_load "$(ubus -S call network.wireless status)"
|
if [ -f /usr/share/libubox/jshn.sh ]; then
|
||||||
json_get_keys phys
|
. /usr/share/libubox/jshn.sh
|
||||||
for p in $phys; do
|
|
||||||
if [ "$1" = "phy" ]; then
|
json_load "$(ubus -S call network.wireless status)"
|
||||||
echo $p
|
json_get_keys phys
|
||||||
continue
|
for p in $phys; do
|
||||||
fi
|
if [ "$1" = "phy" ]; then
|
||||||
json_select "$p"
|
echo $p
|
||||||
json_select "interfaces"
|
continue
|
||||||
json_get_keys ifindex
|
fi
|
||||||
for i in $ifindex; do
|
json_select "$p"
|
||||||
json_select $i
|
json_select "interfaces"
|
||||||
json_get_var ifname ifname
|
json_get_keys ifindex
|
||||||
echo $ifname
|
for i in $ifindex; do
|
||||||
json_select ..
|
json_select $i
|
||||||
done
|
json_get_var ifname ifname
|
||||||
json_select ..
|
echo $ifname
|
||||||
json_select ..
|
json_select ..
|
||||||
done
|
done
|
||||||
|
json_select ..
|
||||||
|
json_select ..
|
||||||
|
done
|
||||||
|
else
|
||||||
|
wifi_ifphylist "$1"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
wifi_ifphylist() {
|
wifi_ifphylist() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<zabbix_export>
|
<zabbix_export>
|
||||||
<version>3.0</version>
|
<version>3.2</version>
|
||||||
<date>2016-05-13T15:42:32Z</date>
|
<date>2016-11-21T16:43:49Z</date>
|
||||||
<groups>
|
<groups>
|
||||||
<group>
|
<group>
|
||||||
<name>Templates</name>
|
<name>Templates</name>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<application>
|
<application>
|
||||||
<name>Wifi</name>
|
<name>Wifi</name>
|
||||||
</application>
|
</application>
|
||||||
<application>
|
<application>
|
||||||
<name>ZAF</name>
|
<name>ZAF</name>
|
||||||
</application>
|
</application>
|
||||||
</applications>
|
</applications>
|
||||||
@ -284,13 +284,19 @@
|
|||||||
<trigger_prototypes>
|
<trigger_prototypes>
|
||||||
<trigger_prototype>
|
<trigger_prototype>
|
||||||
<expression>{Template Zaf iwx:iwx.channel_activetime[{#DEV},{#FREQ}].change()}>20 and ({Template Zaf iwx:iwx.channel_busytime[{#DEV},{#FREQ}].last()}/{Template Zaf iwx:iwx.channel_activetime[{#DEV},{#FREQ}].last()})>0.3</expression>
|
<expression>{Template Zaf iwx:iwx.channel_activetime[{#DEV},{#FREQ}].change()}>20 and ({Template Zaf iwx:iwx.channel_busytime[{#DEV},{#FREQ}].last()}/{Template Zaf iwx:iwx.channel_activetime[{#DEV},{#FREQ}].last()})>0.3</expression>
|
||||||
|
<recovery_mode>0</recovery_mode>
|
||||||
|
<recovery_expression/>
|
||||||
<name>Busy time on channel {#FREQ} on {#DEV} is high</name>
|
<name>Busy time on channel {#FREQ} on {#DEV} is high</name>
|
||||||
|
<correlation_mode>0</correlation_mode>
|
||||||
|
<correlation_tag/>
|
||||||
<url/>
|
<url/>
|
||||||
<status>0</status>
|
<status>0</status>
|
||||||
<priority>2</priority>
|
<priority>2</priority>
|
||||||
<description/>
|
<description/>
|
||||||
<type>0</type>
|
<type>0</type>
|
||||||
|
<manual_close>0</manual_close>
|
||||||
<dependencies/>
|
<dependencies/>
|
||||||
|
<tags/>
|
||||||
</trigger_prototype>
|
</trigger_prototype>
|
||||||
</trigger_prototypes>
|
</trigger_prototypes>
|
||||||
<graph_prototypes>
|
<graph_prototypes>
|
||||||
@ -612,7 +618,6 @@
|
|||||||
</graph_prototypes>
|
</graph_prototypes>
|
||||||
<host_prototypes/>
|
<host_prototypes/>
|
||||||
</discovery_rule>
|
</discovery_rule>
|
||||||
|
|
||||||
<discovery_rule>
|
<discovery_rule>
|
||||||
<name>Wifi neighbours discovery</name>
|
<name>Wifi neighbours discovery</name>
|
||||||
<type>7</type>
|
<type>7</type>
|
||||||
@ -784,6 +789,7 @@
|
|||||||
<host_prototypes/>
|
<host_prototypes/>
|
||||||
</discovery_rule>
|
</discovery_rule>
|
||||||
</discovery_rules>
|
</discovery_rules>
|
||||||
|
<httptests/>
|
||||||
<macros/>
|
<macros/>
|
||||||
<templates/>
|
<templates/>
|
||||||
<screens/>
|
<screens/>
|
||||||
|
Loading…
Reference in New Issue
Block a user