first save
commit
8f6985bb3f
|
@ -0,0 +1,9 @@
|
|||
# instructions
|
||||
|
||||
cron goes to cron
|
||||
|
||||
plugin goes to /etc/munin/plugins/speedtest as symlink from /usr/share/munin or whatever you have the plugin folder
|
||||
|
||||
install the speedtest cli client from their site
|
||||
|
||||
https://williamyaps.github.io/wlmjavascript/servercli.html is handy source for the stupid list of servers -
|
|
@ -0,0 +1 @@
|
|||
2,17,32,47 * * * * python /usr/bin/speedtest --progress=no --precision=2 --server-id=14928 > /var/log/munin/speedtest-results.txt
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
case $1 in
|
||||
config)
|
||||
echo "graph_category network"
|
||||
echo "graph_title Speedtest"
|
||||
echo "graph_args --base 1000 -l 0"
|
||||
echo "graph_vlabel DL / UL"
|
||||
echo "graph_scale no"
|
||||
echo "down.label DL"
|
||||
echo "down.type GAUGE"
|
||||
echo "down.draw LINE1"
|
||||
echo "up.label UL"
|
||||
echo "up.type GAUGE"
|
||||
echo "up.draw LINE1"
|
||||
echo "graph_info Graph of Internet Connection Speed"
|
||||
exit 0;;
|
||||
esac
|
||||
|
||||
OUTPUT=`cat /var/log/munin/speedtest-results.txt`
|
||||
DOWNLOAD=`echo "$OUTPUT" | grep Download | awk '{ print $2 }'`
|
||||
UPLOAD=`echo "$OUTPUT" | grep Upload | awk '{ print $2 }'`
|
||||
|
||||
echo "down.value $DOWNLOAD"
|
||||
echo "up.value $UPLOAD"
|
Loading…
Reference in New Issue