From e03cf6850cca1dde7865c3b4c2fc7d7c84fc4b74 Mon Sep 17 00:00:00 2001 From: Derik Vercueil Date: Sun, 20 Jul 2008 16:03:47 +0200 Subject: [PATCH] Initial version --- plugins/other/globesurfer | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 plugins/other/globesurfer 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