mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
24 lines
859 B
Text
24 lines
859 B
Text
|
#!/bin/sh
|
||
|
######################################################################
|
||
|
#Plugins for fetch download bandwidth to your server from ovh network#
|
||
|
######################################################################
|
||
|
#By Nicolas I. (McKay1717)
|
||
|
#
|
||
|
#
|
||
|
|
||
|
# CONFIG ------------------------------------------------------------------
|
||
|
if [ "$1" = "config" ]; then
|
||
|
echo "graph_title Available download bandwidth to OVH Network"
|
||
|
echo 'graph_args --base 1000 -l 0'
|
||
|
echo 'graph_vlabel MB/s'
|
||
|
echo 'graph_scale no'
|
||
|
echo "download.label download"
|
||
|
exit 0
|
||
|
fi
|
||
|
#If is not a config action => launch download test
|
||
|
echo -n "download.value " #echo key word
|
||
|
wget -O /dev/null http://proof.ovh.net/files/1Gb.dat 2>&1\
|
||
|
| grep MB/s | tail -n 1 | cut -d\( -f2 |
|
||
|
cut -d\ -f1
|
||
|
#Download with wget and get avr speed during the download
|