From 681a393adcd5f3ab90a3f7d46c65feb658809f27 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 31 Jan 2015 17:29:41 +0000 Subject: [PATCH 1/1] Update tile log analyser to use chef gathered logs --- bin/sumlogs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/bin/sumlogs b/bin/sumlogs index e342adc..7096bde 100755 --- a/bin/sumlogs +++ b/bin/sumlogs @@ -13,7 +13,7 @@ my %country_bytes; while (my $record = <>) { - if ($record =~ /^\d+\.\d+\s+\d+\s+(\d+\.\d+\.\d+\.\d+)\s+TCP_[A-Z_]+\/\d+\s+(\d+) (?:GET|HEAD|POST|OPTIONS|PROPFIND) /) + if ($record =~ /^\d+\.\d+\s+\S+\s+".*"\s+(\d+\.\d+\.\d+\.\d+)\s+".*"\s+(\d+)$/) { my $ip = $1; my $bytes = $2; @@ -28,14 +28,6 @@ while (my $record = <>) $total_bytes += $bytes; } - elsif ($record =~ /^\d+\.\d+\s+\d+\s+(\d+\.\d+\.\d+\.\d+)\s+TCP_DENIED\/\d+\s+(\d+) /) - { - # do nothing - } - elsif ($record =~ /^\d+\.\d+\s+\d+\s+(\d+\.\d+\.\d+\.\d+)\s+UDP_[A-Z_]+\/\d+\s+(\d+) ICP_QUERY /) - { - # do nothing - } else { warn $record; -- 2.39.5