Hi,
We are getting the below error in the logstash. We are using a field called "destination" for both time and string. We observed below issue when the destination field value is a string .
ELasticsearch and Logstash versions are 7.16.3
Error:
"reason"=>"failed to parse field [destination] of type [date] in document with id '*****'. Preview of field's value: 'REDIS'", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"failed to parse date field [REDIS] with format [strict_date_optional_time||epoch_millis]", "caused_by"=>{"type"=>"date_time_parse_exception", "reason"=>"date_time_parse_exception: Failed to parse with all enclosed parsers"}}}}}}
Below is our Logstash configuration:
else if [sourceType] == "filebeat" {
json {
source => "message"
target => "parsedJson"
}
mutate {
remove_field => [
"[message]"
]
lowercase => [ "app" ]
}
if (![latency] or [latency]=="") {
mutate {
add_field => {
latency => -1
}
}
}
mutate {
convert => {
"latency" => "integer"
}
}
date {
match => [ "ts", "yyyy-MM-dd HH:mm:ss,SSS" ]
timezone => "Europe/London"
target => [ "df_ts" ]
remove_field => ["ts"]
}
mutate {
convert => {
"destination" => "string"
}
}