Problem:
Logs not ordered in when viewing through kibana.
Goal:
Replace timestamp with the time in the log messaage. So that i can order my logs in kibana
Error: dataparsefailure. I dont see any other error message in the logs
Conf:
input {
beats {
port => 5044
}
}
filter {
date {
locale => "en"
match => ["message", "YYYY-MM-dd HH:mm:ss,SSS"]
timezone => "America/Chicago"
}
}
output {
elasticsearch {
hosts => "localhost:9200"
manage_template => false
index => "%{[metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[metadata][type]}"
}
}
Logs:
output received {"event"=>{"@timestamp"=>2017-05-31T17:18:46.639Z, "offset"=>43069, "@version"=>"1", "input_type"=>"log", "beat"=>{"hostname"=>"rsappd123", "name"=>"rsappd123", "version"=>"5.4.0"}, "host"=>"rsappd111", "source"=>"/apps/logs/abc/abc.log", "message"=>"2017-05-31 12:18:39,817 02035935ec ABBXYZZ c.a.e.r.s.hotelExchangeImpl:hotelExchange:250 [INFO] - Total transaction response time: 877", "type"=>"log", "tags"=>["beats_input_codec_plain_applied", "_dateparsefailure"]}}
Log after starting logstash:
[2017-05-31T12:14:04,821][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"date", :type=>"filter", :class=>LogStash::Filters::Date}
[2017-05-31T12:14:04,823][DEBUG][logstash.filters.date ] config LogStash::Filters::Date/locale = "en"
[2017-05-31T12:14:04,823][DEBUG][logstash.filters.date ] config LogStash::Filters::Date/match = ["message", "YYYY-MM-dd HH:mm:ss,SSS"]
[2017-05-31T12:14:04,823][DEBUG][logstash.filters.date ] config LogStash::Filters::Date/@timezone = "America/Chicago"
[2017-05-31T12:14:04,823][DEBUG][logstash.filters.date ] config LogStash::Filters::Date/id = "7b4c32e1f7fd8ae4047cf2f25b3977a62e3e48ef-2"
[2017-05-31T12:14:04,823][DEBUG][logstash.filters.date ] config LogStash::Filters::Date/enable_metric = true
[2017-05-31T12:14:04,823][DEBUG][logstash.filters.date ] config LogStash::Filters::Date/add_tag = []
[2017-05-31T12:14:04,823][DEBUG][logstash.filters.date ] config LogStash::Filters::Date/remove_tag = []
[2017-05-31T12:14:04,823][DEBUG][logstash.filters.date ] config LogStash::Filters::Date/add_field = {}
[2017-05-31T12:14:04,823][DEBUG][logstash.filters.date ] config LogStash::Filters::Date/remove_field = []
[2017-05-31T12:14:04,824][DEBUG][logstash.filters.date ] config LogStash::Filters::Date/periodic_flush = false
[2017-05-31T12:14:04,824][DEBUG][logstash.filters.date ] config LogStash::Filters::Date/target = "@timestamp"
[2017-05-31T12:14:04,824][DEBUG][logstash.filters.date ] config LogStash::Filters::Date/tag_on_failure = ["_dateparsefailure"]
[2017-05-31T12:14:04,836][DEBUG][org.logstash.filters.DateFilter] Date filter with format=YYYY-MM-dd HH:mm:ss,SSS, locale=en, timezone=America/Chicago built as org.logstash.filters.parser.JodaParser
Please help!!!