Skip to content

Commit

Permalink
Add source HOST to graph_title
Browse files Browse the repository at this point in the history
  • Loading branch information
leeclemens committed Nov 12, 2016
1 parent 3997631 commit dc129c5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions plugins/network/mtr100_
Expand Up @@ -5,7 +5,7 @@
#
# Version: 1.0
# Author: tobias.geiger@vido.info
# Please email me bugs/suggestions
# Please email me bugs/suggestions
#
# Version: 1.1
# Author: charlie@evilforbeginners.com
Expand Down Expand Up @@ -63,7 +63,7 @@ total+=$6
}
END {
for (x=1; x<=count; x++) {
for (x=1; x<=count; x++) {
value=(val[x]/total)*100
if ( C != "config" ) { printf "%s.value %2.2f\n","hop_" lab[x],value }
if ( C == "config" ) { print "hop_" lab[x] ".label " name[x] }
Expand All @@ -73,8 +73,7 @@ END {
}

if [ "$1" = "config" ]; then

echo 'graph_title Traceroute (%) to '$totrace
echo "graph_title Traceroute `mtr -nrc 1 localhost | grep -E '^HOST' | awk '{print $2}'` to "$totrace
echo 'graph_args --base 1000 -l 0 -u 100 -r'
echo 'graph_vlabel ms (percentage)'
echo 'graph_category network'
Expand All @@ -86,4 +85,3 @@ if [ "$1" = "config" ]; then
else
dotrace;
fi

0 comments on commit dc129c5

Please sign in to comment.