2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Merge pull request #86 from yeled/master

patch the already existing mtr100_
This commit is contained in:
Kenyon Ralph 2012-04-17 15:04:31 -07:00
commit c3fc6a2c1a

View File

@ -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" } }
}
}'
}