Log with @timestamp value in it - getting errors

Hi,
Im processing logfile with logstash which unfortunately contains @timestamp value

{ "@timestamp": "2019-11-20 17:27:02.894", "c": "386", "chl": "B", "event": "Content", "time": "290", "calculationStartDate": "2019-11-20 17:27:02.604" }

Sadly, I'm getting bunch of errors in my log file which I want to ger rid of
[WARN ][logstash.filters.json ] Unrecognized @timestamp value, setting current time to @timestamp, original in _@timestamp field {:value=>"\"2019-11-20 18:24:53.11\""}
The problem is even I match the date with _@timestamp, and generally get the proper log time in @timestamp I'm still getting error messages in the log file - which I don't like - is there a way to avoid these messages in the log? Change the field name before Logstash parses it? Or any other idea? I'm trying to avoid making changes by Devs the way app logs the events, also this is not baing collected by Filebeat, it's being sent directly by the app to Kafka.

The code that logs this is unconditional. If the field name is @timestamp then it is going to log if it cannot parse it. As you say, you could mutate+gsub it then implement the overwrite of @timestamp yourself. This would have the added benefit of being able to parse slight variations that the json filter does not parse.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.