good morning...new user to be gentle if I don't quite say thing correctly
My logstash is V 2.2.2, running on CentOS 7.3.
Part of the data logstash handles is from a Progress RDBMS database log file. In that file there is a line added every time the database starts/stops, with the format:
" EEE MMM dd HH:mm:ss yyyy" as in " Wed Oct 11 16:33:22 2017"
We do not need to send these to logstash.
We see constant errors in logstash.log:
{:timestamp=>"2017-11-01T09:00:52.334000-0700", :message=>"Failed parsing date from field", :field=>"datetimein", :value=>"%{datetimein]0]}", :exception=>"Invalid format: "%{datetimein]0]}"", :config_parsers=>"yyyy/MM/dd@HH:mm:ss.SSSZ", :config_locale=>"default=en_US", :level=>:warn}
{:timestamp=>"2017-11-01T09:00:52.335000-0700", :message=>"Failed parsing date from field", :field=>"datetimein", :value=>"%{datetimein]0]}", :exception=>"Invalid format: "%{datetimein]0]}"", :config_parsers=>"yyyy/MM/dd@HH:mm:ss.SSSZ", :config_locale=>"default=en_US", :level=>:warn}
{:timestamp=>"2017-11-01T09:00:52.336000-0700", :message=>"Failed parsing date from field", :field=>"datetimein", :value=>" Wed Nov 1 09:00:42 2017", :exception=>"Invalid format: " Wed Nov 1 09:00..."", :config_parsers=>"yyyy/MM/dd@HH:mm:ss.SSSZ", :config_locale=>"default=en_US", :level=>:warn}
{:timestamp=>"2017-11-01T09:00:52.336000-0700", :message=>"Failed parsing date from field", :field=>"datetimein", :value=>" Wed Nov 1 09:00:42 2017", :exception=>"Invalid format: " Wed Nov 1 09:00..."", :config_parsers=>"yyyy/MM/dd@HH:mm:ss.SSSZ", :config_locale=>"default=en_US", :level=>:warn}
{:timestamp=>"2017-11-01T09:00:52.338000-0700", :message=>"Failed parsing date from field", :field=>"datetimein", :value=>"%{datetimein]0]}", :exception=>"Invalid format: "%{datetimein]0]}"", :config_parsers=>"yyyy/MM/dd@HH:mm:ss.SSSZ", :config_locale=>"default=en_US", :level=>:warn}
{:timestamp=>"2017-11-01T09:00:52.339000-0700", :message=>"Failed parsing date from field", :field=>"datetimein", :value=>"%{datetimein]0]}", :exception=>"Invalid format: "%{datetimein]0]}"", :config_parsers=>"yyyy/MM/dd@HH:mm:ss.SSSZ", :config_locale=>"default=en_US", :level=>:warn}
{:timestamp=>"2017-11-01T09:00:52.339000-0700", :message=>"Failed parsing date from field", :field=>"datetimein", :value=>" Wed Nov 1 09:00:42 2017", :exception=>"Invalid format: " Wed Nov 1 09:00..."", :config_parsers=>"yyyy/MM/dd@HH:mm:ss.SSSZ", :config_locale=>"default=en_US", :level=>:warn}
I am certain these are due to the data/time format of the aforementioned database log file lines parsed.
I found a reference to creating a filter, which I did as follows:
filter {
if [datetimein] == " EEE MMM dd HH:mm:ss yyyy" {
drop { }
}
}
configtest shows:
logstash --configtest -f logstash.conf.NEW
Error: Expected one of #, => at line 74, column 12 (byte 2072) after filter {
which is this filter, so it's obvious I have an issue with this configuration. Being a novice I'm wondering if any of the experts here can offer a solution.
Thanks!