I have a strange problem with the date filter : whenever I use it and there is no year specified in the field, instead of using the current year, it puts 2000 in @timestamp.
Tested on a wide variety of logs with different date patterns.
Tested with logstash 2.1.2 and 2.2.2.
Since I have found no trace of this problem on the web, I think I am doing something wrong.
Could someone please tell me how to do it right ?
TYVM
Example message:
Mar 1 11:25:01 sv-t-vnl-relaisint01 postfix/qmgr[13312]: DEA6C14E: removed
Filter used :
grok {
match => { "message" => "%{SYSLOGTIMESTAMP:timestamp} %{GREEDYDATA:real_message}"}
}
date {
match => [ "timestamp",
"MMM dd HH:mm:ss",
"MMM d HH:mm:ss"
]
timezone => "Europe/Paris"
remove_field => [ "timestamp" ]
}
My server date is correct :
root@sv-t-vnl-logs-central01:~# date
mardi 1 mars 2016, 11:38:09 (UTC+0100)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.