Skip to content

Commit

Permalink
Allow to grok unpadded seconds
Browse files Browse the repository at this point in the history
As identified in LOGSTASH-709 : Grok "TIME" failing on unpadded "seconds"
  • Loading branch information
wiibaa committed Feb 17, 2014
1 parent f3994eb commit 815e984
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion patterns/grok-patterns
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 815e984

Please sign in to comment.