I have the following config:
input {
file {
path => "/root/logs/test.log"
type => "accesslog"
start_position => beginning
sincedb_path => "/dev/null"
ignore_older => 0
}
}
filter {
grok {
match => ["message", "(?<datetime>%{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{HOUR}:%{MINUTE}:%{SECOND})"]
}
date {
match => ["datetime", "yyyy:MM:dd HH:mm:ss"]
target => "@timestamp"
}
}
output {
stdout { codec => rubydebug }
}
And log (one line for easy checking):
2016-10-01 00:00:23
And when I run logstash, I get an error:
{
"path" => "/root/logs/test.log",
"datetime" => "2016-10-01 00:00:23",
"@timestamp" => 2017-01-26T12:13:01.216Z,
"@version" => "1",
"host" => "ax-2",
"message" => "2016-10-01 00:00:23",
"type" => "accesslog",
"tags" => [
[0] "_dateparsefailure"
]
}
I have looked for dozens of topics, but have no idea why it is failing. I'm using latest ELK on Ubuntu 14.04.