RadixTreeSyslogParser confuses timezone and hostname fields

Description

Because hostname and timezone are both string types, they are being confused by the parser, even though timezone parsing should throw an exception if an invalid value (such as a hostname) is encountered.

If you observe here even though hostname is localhost it’s not considered as hostname since it was parsed as timezone and exception was thrown and further it has got parsed:

This is parsed correctly:

If we keep hostname first and time zone we can see following, hostname is parsed correctly:

But here time zone is considered as hostname:

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Malatesh October 6, 2017 at 9:00 AM

 Thank you Seth,I would look into the pull request and test it from our side and will update you.

Seth Leger October 5, 2017 at 4:28 PM

Seth Leger October 4, 2017 at 9:05 PM

I've reproduced this in a unit test. Working on a fix for the problem now.

Seth Leger October 4, 2017 at 7:56 PM

The messages that were used to test this issue are:

and the grok patterns are:

Fixed

Details

Assignee

Reporter

Components

Sprint

Affects versions

Priority

PagerDuty

Created July 19, 2017 at 2:46 PM
Updated October 10, 2017 at 3:29 PM
Resolved October 10, 2017 at 3:29 PM