diff --git a/plugins/other/globesurfer b/plugins/other/globesurfer new file mode 100755 index 00000000..25a5b003 --- /dev/null +++ b/plugins/other/globesurfer @@ -0,0 +1,35 @@ +#!/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