diff --git a/plugins/network/mtr100_ b/plugins/network/mtr100_ index 96cbb494..ff40a9cb 100755 --- a/plugins/network/mtr100_ +++ b/plugins/network/mtr100_ @@ -7,6 +7,9 @@ # Author: tobias.geiger@vido.info # Please email me bugs/suggestions # +# Version: 1.1 +# Author: charlie@evilforbeginners.com +# changed: munin eats 1 character ds-names. prefix with "hop_" # # # HINT: Needs a bigger TIMEOUT-Value than the default (10) in /etc/munin/plugin-conf.d/munin-node , @@ -47,7 +50,7 @@ fi dotrace() { -LC_ALL=C mtr -nrs 1024 -c 10 $totrace | grep -v "^HOST:" | LC_ALL=C awk -v C=$1 ' { +LC_ALL=C mtr -nrs 1024 -c 5 $totrace | grep -v "^HOST:" | LC_ALL=C awk -v C=$1 ' { label=$2 x=gsub("\\.","_",label) @@ -62,9 +65,9 @@ total+=$6 END { for (x=1; x<=count; x++) { value=(val[x]/total)*100 - if ( C != "config" ) { printf "%s.value %2.2f\n",lab[x],value } - if ( C == "config" ) { print lab[x] ".label " name[x] } - if ( C == "config" ) { if ( x == 1 ) { print lab[x]".draw AREA" } else { print lab[x]".draw STACK" } } + if ( C != "config" ) { printf "%s.value %2.2f\n","hop_" lab[x],value } + if ( C == "config" ) { print "hop_" lab[x] ".label " name[x] } + if ( C == "config" ) { if ( x == 1 ) { print "hop_" lab[x]".draw AREA" } else { print "hop_" lab[x]".draw STACK" } } } }' }