speedtest-munin/speedtest_ping

26 lines
711 B
Plaintext
Raw Normal View History

2022-02-21 14:09:23 +02:00
#!/bin/bash
case $1 in
config)
echo "graph_category network"
echo "graph_title Speedtest latency"
echo "graph_args --base 1000 -l 0"
echo "graph_vlabel Ping / jitter"
echo "graph_scale no"
echo "ping.label Latency"
echo "ping.type GAUGE"
echo "ping.draw LINE1"
echo "jitter.label Jitter"
echo "jitter.type GAUGE"
echo "jitter.draw LINE1"
echo "graph_info Graph of Internet Connection latency"
exit 0;;
esac
OUTPUT=`cat /var/log/munin/speedtest-results.txt`
PING=`echo "$OUTPUT" | grep Latency | awk '{ print $2 }'`
JITTER=`echo "$OUTPUT" |grep "Idle Latency" | awk '{ print $6 }' | sed 's/.$//'`
2022-02-21 14:09:23 +02:00
echo "ping.value $PING"
echo "jitter.value $JITTER"