From acc4135cd574cdca66cb2186a478b952aa115855 Mon Sep 17 00:00:00 2001 From: Charlie Allom Date: Tue, 17 Apr 2012 22:47:02 +0100 Subject: [PATCH 1/3] update to v1.1 --- plugins/network/mtr100_ | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/network/mtr100_ b/plugins/network/mtr100_ index 96cbb494..3fd59e79 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 , From fae716b47802d37fba6ccd888f59df1ae4e0d61a Mon Sep 17 00:00:00 2001 From: Charlie Allom Date: Tue, 17 Apr 2012 22:47:30 +0100 Subject: [PATCH 2/3] decrease pings to 5 for faster polling --- plugins/network/mtr100_ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/network/mtr100_ b/plugins/network/mtr100_ index 3fd59e79..a6ccd626 100755 --- a/plugins/network/mtr100_ +++ b/plugins/network/mtr100_ @@ -50,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) From 7c3ecf1bc5e40bf1855a867789c620852fc0a110 Mon Sep 17 00:00:00 2001 From: Charlie Allom Date: Tue, 17 Apr 2012 22:47:55 +0100 Subject: [PATCH 3/3] increase the ds-name to be prefixed by hop_ so newer munins wont try to store everything datapoint in "_" --- plugins/network/mtr100_ | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/network/mtr100_ b/plugins/network/mtr100_ index a6ccd626..ff40a9cb 100755 --- a/plugins/network/mtr100_ +++ b/plugins/network/mtr100_ @@ -65,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" } } } }' }