root / plugins / other / globesurfer @ 17f78427
Historique | Voir | Annoter | Télécharger (749 octets)
| 1 |
#!/bin/sh |
|---|---|
| 2 |
# |
| 3 |
# |
| 4 |
# Script to the signal strength of a Open GlobeSurfer II 3G router. |
| 5 |
# |
| 6 |
# Parameters understood: |
| 7 |
# |
| 8 |
# config (required) |
| 9 |
# autoconf (optional - used by munin-config) |
| 10 |
# |
| 11 |
# |
| 12 |
# Magic markers (optional - used by munin-config and installation |
| 13 |
# scripts): |
| 14 |
# |
| 15 |
#%# family=auto |
| 16 |
#%# capabilities=autoconf |
| 17 |
MAXLABEL=20 |
| 18 |
|
| 19 |
if [ "$1" = "autoconf" ]; then |
| 20 |
echo yes |
| 21 |
exit 0 |
| 22 |
fi |
| 23 |
|
| 24 |
if [ "$1" = "config" ]; then |
| 25 |
|
| 26 |
echo 'graph_title GlobeSurfer II Signal Strength' |
| 27 |
echo 'graph_args --base 1000 -l 0' |
| 28 |
echo 'graph_vlabel Daily Statistics' |
| 29 |
echo 'signal_strength.label Signal Strength' |
| 30 |
exit 0 |
| 31 |
fi |
| 32 |
|
| 33 |
wget -q http://192.168.1.1 -O /tmp/index.html |
| 34 |
grep "dBm" /tmp/index.html | perl -ne 'if (/(-\d+) dBm/) {print "-en signal_strength.value ".$1}';
|
| 35 |
rm /tmp/index.html |
