From 5868af5d87043746e841c1c483471d463cacb507 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Wed, 4 Nov 2015 17:51:13 +0200 Subject: [PATCH] wlstats-gather: Add channel monitoring --- monitoring/collectd/scripts/wlstats-gather/wlstats-gather.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monitoring/collectd/scripts/wlstats-gather/wlstats-gather.sh b/monitoring/collectd/scripts/wlstats-gather/wlstats-gather.sh index 5d4f371..0dfe9fc 100644 --- a/monitoring/collectd/scripts/wlstats-gather/wlstats-gather.sh +++ b/monitoring/collectd/scripts/wlstats-gather/wlstats-gather.sh @@ -35,6 +35,7 @@ while true ; do _signal=$(grep 'Signal' /var/run/${_start_time}_${_interface} | awk '{print $2}' | tr -d '-') _noise=$(grep 'Noise' /var/run/${_start_time}_${_interface} | awk '{print $5}' | tr -d '-') _bit_rate=$(grep 'Bit Rate' /var/run/${_start_time}_${_interface} | awk '{print $3}') + _channel=$(grep 'Channel' /var/run/${_start_time}_${_interface} | awk '{print $4}') _clients=$(${_iw} ${_interface} station dump | grep '^Station' | wc -l) # start emiting metrics @@ -43,6 +44,7 @@ while true ; do echo -e "PUTVAL ${_HOSTNAME}/${_PLUGIN}-${_interface}/gauge-signal ${_start_time}:${_signal}" echo -e "PUTVAL ${_HOSTNAME}/${_PLUGIN}-${_interface}/gauge-noise ${_start_time}:${_noise}" echo -e "PUTVAL ${_HOSTNAME}/${_PLUGIN}-${_interface}/gauge-bit_rate ${_start_time}:${_bit_rate}" + echo -e "PUTVAL ${_HOSTNAME}/${_PLUGIN}-${_interface}/gauge-channel ${_start_time}:${_channel}" echo -e "PUTVAL ${_HOSTNAME}/${_PLUGIN}-${_interface}/gauge-clients ${_start_time}:${_clients}" # now let's pick up the statistics