Hi, i have a working elastic stack linux setup for evaulation but I wanted to try out Windows 7 as server as well.. Because I have to backfill a lot of logs, I have to change the timestamp with the filter date to the real time from the logs. This works fine on ubuntu with the following filter:
input { stdin{}}
filter {
date {
locale =>"en"
match => ["message","YYYY-MM-dd;HH:mm:ss.SSS"]
timezone =>"Europe/Vienna"
target =>"@timestamp"
add_field => {"debug" => "timestampMatched"}
}
}
output { stdout {codec =>"rubydebug" }}
input:
2014-08-01;11:00:22.123
The output is:
{
"message" =>"2014-08-01;11:00:22.123",
"@version" =>"1",
"@timestamp" => "2014-08-01T09:00:22.123Z",
"host" =>"ABCDE",
"debug" =>"timestampMatched"
}
On Win7 (Win 7 Ultimate x64, jdk-8u74 x64, elasticSearch 2.2.0, logstash 2.2.2), i always get a dateparsefailure because of a mysterious \r... Who can help me solving this problem ?
c:\elastic\logstash\bin>logstash agent -f datetest.conf
io/console not supported; tty will not be manipulated
Settings: Default pipeline workers: 1
Logstash startup completed
2016-03-13;15:33:22.123
?[33mFailed parsing date from field {:field=>"message", :value=>"2016-03-13;15:3
3:22.123\r", :exception=>"Invalid format: "2016-03-13;15:33:22.123\r" is malfo
rmed at "\r"", :config_parsers=>"YYYY-MM-dd;HH:mm:ss.SSS", :config_locale=>"en
", :level=>:warn}?[0m
{
"message" => "2016-03-13;15:33:22.123**\r**",
"@version" => "1",
"@timestamp" => "2016-03-13T22:22:23.889Z",
"host" => "WIN-F75UV5K32SV",
"tags" => [
[0] "_dateparsefailure"
]
}