Hi,
I'm running filebeat 7.6.2 with logstash 7.5.1 having missing lines of logs in ES due this warning message ...
[2020-04-21T21:25:21,105][WARN ][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"tableau_json_log_test-2020.04", :routing=>nil, :_type=>"_doc"}, #LogStash::Event:0x2c15edaa], :response=>{"index"=>{"_index"=>"tableau_json_log_test-2020.04", "_type"=>"_doc", "_id"=>"W_OhnnEBf8OpJ0AbkmlE", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"object mapping for [v] tried to parse field [v] as object, but found a concrete value"}}}}
Data sample below it works with line #1 for [v] field structure but no for the #2,, any idea/advise how can I handle when [v] as an object ?
#1 :
{"ts":"2020-03-17T00:00:48.950","pid":18640,"tid":"6540","sev":"info","req":"-","sess":"-","site":"-","user":"-","k":"rotate-log","v":{"new-path":"D:\Tableau\Tableau Server\data\tabsvc\logs\vizqlserver\nativeapi_vizqlserver_9-2_2020_03_17_00_00_00.txt","old-path":"D:\Tableau\Tableau Server\data\tabsvc\logs\vizqlserver\nativeapi_vizqlserver_9-2_2020_03_16_00_00_00.txt"}}
#2 :
{"ts":"2020-03-17T00:00:48.949","pid":18640,"tid":"5cb0","sev":"info","req":"-","sess":"-","site":"-","user":"-","k":"msg","v":"ModelCacheInvalidator notifying dirty model for InvalidatorId=4270"}
I'm using these properties in my input filebeat to read json log files, the rest configuration is the default one.
json.keys_under_root: true
json.add_error_key: true
json.message_key: log
logstash configuration is:
input {
beats {
port => 5040
ssl => true
ssl_key => '..../logstash-test.pkcs8.key'
ssl_certificate => '..../logstash-test.crt'
}
}
output {
if [fields][log_type] == "tableau_json_log_test" {
elasticsearch {
hosts => ["https://test1.com:9200","https://test2.com:9200","https://test3.com:9200"]
index => "tableau_json_log_test-%{+YYYY.MM}"
ssl => true
ssl_certificate_verification => true
cacert => '.../ca.crt'
user => 'usr'
password => 'passwd'
}
}
}