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

Removing erroneous line from mtr output.

Newer versions of mtr outputs a "Start: <date here>" line which would be
picked up and incorrectly graphed in munin. Adding an additional inverse grep
field to remove this extra line if it is present. Also added case insensitive
flag to the grep.
This commit is contained in:
Mike O'Driscoll 2014-12-23 18:37:53 -05:00
parent c61cdea256
commit 78bb6f750b

View File

@ -50,7 +50,7 @@ fi
dotrace() {
LC_ALL=C mtr -nrs 1024 -c 5 $totrace | grep -v "^HOST:" | LC_ALL=C awk -v C=$1 ' {
LC_ALL=C mtr -nrs 1024 -c 5 $totrace | grep -vi -E "^HOST:|^Start:" | LC_ALL=C awk -v C=$1 ' {
label=$2
x=gsub("\\.","_",label)