Hi All,
I'm processing two different log type using elasticsearch (each log type is stored in different index).
I have a problem processing the timestamp field only with one log type.
I would like to create @timestamp starting from date and time fields, in order to have "Event Date" and not "Processed Date" as referrer.
The Type 1 works great with the following configuration and everything is ok:
******* LOG EXAMPLE *******
Date,Time,...
"29-07-2016","10:19:04",...
mutate {
add_field => {
"datetime" => "%{Date} %{Time}"
}
}
date {
locale => "en"
match => ["datetime", "dd-MM-yyyy HH:mm:ss"]
timezone => "UTC"
target => "@timestamp"
}
mutate {
remove_field => ["datetime"]
}
When the second type is enabled, elasticsearch stops indexing and no more event are shown in the kibana dashboard (logstash.log doesn't report any error or warning at all).
******* LOG EXAMPLE *******
DateSent,TimeSent,...
2016/07/29,10:27:20.405,...
mutate {
gsub => ["TimeSent", "\.\d{3}$", ""]
add_field => {
"tempts" => "%{DateSent} %{TimeSent}"
}
}
date {
locale => "en"
match => [ "tempts", "yyyy/MM/dd HH:mm:ss" ]
timezone => "UTC"
target => "@timestamp"
}
mutate {
remove_field => ["tempts", "DateSent", "TimeSent"]
}
If I comment out all the date section, logs are processed (with received timestamp)
Could you help me please ?
Thanx in advance