Hello, I currently have a problem for date conversion with Logstash.
I receive logs including dates in epoche format (UNIX), so I added the following filters to modify them. Namely, I have multiple date fields, as you can see.
My configuration :
filter {
json {
source => "message"
}
date {
match => [ "startDate","UNIX_MS" ]
target => "startDate"
timezone => "UTC"
}
date {
match => [ "endDate","UNIX_MS" ]
target => "endDate"
timezone => "UTC"
}
date {
match => [ "updatedAt","UNIX_MS" ]
target => "updatedAt"
timezone => "UTC"
}
date {
match => [ "createdAt","UNIX_MS" ]
target => "createdAt"
timezone => "UTC"
}
}
In this case, I get, in Elasticsearch, the dates: 2,022 for every fields of date.
On the other hand, if I remove the target in one of the dates, this modifies the @timestamp with the correct date, but each date must keep its field name...
Any ideas ?