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:
parent
835f964ee5
commit
e03cf6850c
1 changed files with 35 additions and 0 deletions
35
plugins/other/globesurfer
Executable file
35
plugins/other/globesurfer
Executable file
|
@ -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
|
Loading…
Reference in a new issue