From 815e984cf33c03ad6c59d0de902f8426ff55acd8 Mon Sep 17 00:00:00 2001 From: Wiibaa Date: Mon, 17 Feb 2014 09:13:12 +0100 Subject: [PATCH] Allow to grok unpadded seconds As identified in LOGSTASH-709 : Grok "TIME" failing on unpadded "seconds" --- patterns/grok-patterns | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patterns/grok-patterns b/patterns/grok-patterns index afeadac646a..15dd5ac09a7 100755 --- a/patterns/grok-patterns +++ b/patterns/grok-patterns @@ -57,7 +57,7 @@ YEAR (?>\d\d){1,2} HOUR (?:2[0123]|[01]?[0-9]) MINUTE (?:[0-5][0-9]) # '60' is a leap second in most time standards and thus is valid. -SECOND (?:(?:[0-5][0-9]|60)(?:[:.,][0-9]+)?) +SECOND (?:(?:[0-5]?[0-9]|60)(?:[:.,][0-9]+)?) TIME (?!<[0-9])%{HOUR}:%{MINUTE}(?::%{SECOND})(?![0-9]) # datestamp is YYYY/MM/DD-HH:MM:SS.UUUU (or something like it) DATE_US %{MONTHNUM}[/-]%{MONTHDAY}[/-]%{YEAR}