2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Initial version

This commit is contained in:
Derik Vercueil 2008-07-20 16:29:04 +02:00 committed by Steve Schnepp
parent e03cf6850c
commit 96996d2892

67
plugins/other/conexant_adsl Executable file
View File

@ -0,0 +1,67 @@
#!/bin/sh
#
#
# Script to show adsl router stats for routers with Conexant based chips and the standard Conexant web admin gui like the eTec EpicRouter...
#
# Parameters understood:
#
# config (required)
# autoconf (optional - used by munin-config)
#
#
# Magic markers (optional - used by munin-config and installation
# scripts):
#
#%# family=auto
#%# capabilities=autoconf
USERNAME=admin
PASSWORD=epicrouter
MAXLABEL=20
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
if [ "$1" = "config" ]; then
echo 'graph_title ADSL Connection Statistics'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel Daily Connection Statistics'
echo 'st_dw_crc.label Downstream CRC count'
echo 'st_up_crc.label Upstream CRC count'
echo 'st_dw_data_rate.label Downstream Data Rate'
echo 'st_up_data_rate.label Upstream Data Rate'
echo 'st_dw_line_attenuation.label Downstream Line Attenuation'
echo 'st_up_line_attenuation.label Upstream Line Attenuation'
echo 'st_dw_errored_seconds.label Downstream Errored Seconds'
echo 'st_up_errored_seconds.label Upstream Errored Seconds'
exit 0
fi
wget -q --http-user=admin --http-passwd=epicrouter http://10.0.0.2/doc/adsl.htm -O /tmp/adsl.htm
echo -en "st_dw_crc.value "
echo $((`grep 'var st_dw_crc' /tmp/adsl.htm | sed 's/[var st_dw_crc=;"]//g'`))
echo -n
echo -en "st_up_crc.value "
echo $((`grep 'var st_up_crc' /tmp/adsl.htm | sed 's/[var st_up_crc=;"]//g'`))
echo -n
echo -en "st_dw_data_rate.value "
echo $((`grep 'var st_dw_data_rate' /tmp/adsl.htm | sed 's/[var st_dw_data_rate=;"]//g'`))
echo -n
echo -en "st_up_data_rate.value "
echo $((`grep 'var st_up_data_rate' /tmp/adsl.htm | sed 's/[var st_up_data_rate=;"]//g'`))
echo -n
echo -en "st_dw_line_attenuation.value "
echo $((`grep 'var st_dw_line_attenuation' /tmp/adsl.htm | sed 's/[var st_dw_line_attenuation=\.;"]//g'`))
echo -n
echo -en "st_up_line_attenuation.value "
echo $((`grep 'var st_up_line_attenuation' /tmp/adsl.htm | sed 's/[var st_up_line_attenuation=;\."]//g'`))
echo -n
echo -en "st_dw_errored_seconds.value "
echo $((`grep 'var st_dw_errored_seconds' /tmp/adsl.htm | sed 's/[var st_dw_errored_seconds=;"]//g'`))
echo -n
echo -en "st_up_errored_seconds.value "
echo $((`grep 'var st_up_errored_seconds' /tmp/adsl.htm | sed 's/[var st_up_errored_seconds=;"]//g'`))
echo -n
rm /tmp/adsl.htm