I have been following the Logstash tutorial and created the following config file for test purposes:
input {
file {
path => "C:\Dev\sample.log"
start_position => beginning
}
}
filter{
date {
match => [ "logdate", "YYYY-MM-dd HH:mm:ss,SSS" ]
}
}
output {
elasticsearch { host => localhost
index => "test"
}
stdout { codec => rubydebug }
}
However, the only fields that are output are "message", "@version", "@timestamp", "host" and "path".
No "logdate" is retrieved. I have searched for a while and I saw people having the same problem given wrong date format, but I checked mine with "Joda-Time" just as Logstash tutorial recommends. Thank you for your help.