Closed timukas closed 9 years ago
timestamp
is an "internal" field of GELF messages (see https://www.graylog.org/resources/gelf/) and shouldn't be overwritten.
If you absolutely want to overwrite the timestamp
attribute in your messages, you'll have to use the correct date format (see https://github.com/Graylog2/graylog2-server/blob/2fd51fc472192e7491c692f31448f884d8116fd2/graylog2-plugin-interfaces/src/main/java/org/graylog2/plugin/Tools.java#L65).
Now i'm lost.
If a create regex extractor for apache's date-time field (same logs are used as in above example), name it as a "timestamp", set date type converter to "dd/MMM/yyyy:HH:mm:ss Z", then all works fine.
Caused by: org.elasticsearch.index.mapper.MapperParsingException: failed to parse date field [2015-07-14T11:50:41.000Z], tried both date format [yyyy-MM-dd HH:mm:ss.SSS], and timestamp number with locale []
The correct timestamp for this date format would be "2015-07-14 11:50:41.000" (no 'T' between date and time, and no timezone).
@timukas I have encountered such a problem. the environment is:
Hi,
I'm running lates 1.2 snapshot (graylog-1.2.0-SNAPSHOT-20150714073202 + graylog-web-interface-1.2.0-SNAPSHOT-20150714075226).
As a test i'm sending default apache logs to graylog. All required grok patterns are defined. Test message's timestamp is parsed correctly when i press "Try!" button. My grok pattern is:
When i save an extractor i get errors in graylog server logs:
And some more logs:
Any ideas of that?