2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00
contrib-munin/plugins/other/globesurfer
2011-12-18 15:10:11 +01:00

36 lines
753 B
Bash
Executable File

#!/bin/sh
#
#
# Script to the signal strength of a Open GlobeSurfer II 3G router.
#
# Parameters understood:
#
# config (required)
# autoconf (optional - used by munin-config)
#
#
# Magic markers (optional - used by munin-config and installation
# scripts):
#
#%# family=auto
#%# capabilities=autoconf
MAXLABEL=20
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
if [ "$1" = "config" ]; then
echo 'graph_title GlobeSurfer II Signal Strength'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel Daily Statistics'
echo 'signal_strength.label Signal Strength'
exit 0
fi
wget -q http://192.168.1.1 -O /tmp/index.html
grep "dBm" /tmp/index.html | perl -ne 'if (/(-\d+) dBm/) {print "-en signal_strength.value ".$1}';
rm /tmp/index.html