I feel the document_id might be causing the problem. Try without it and put to stdout codec and see if you can print into console. (Do without any if conditions first and see)
Nope. It didnt help. Currently my output is changed as below
output
{
elasticsearch
{
hosts => ["localhost:9200"]
index => "dashboard_write"
}
}
Logs contain only below
[2020-08-03T08:06:25,649][DEBUG][logstash.filters.grok ][events] Event now: {:event=>#LogStash::Event:0x433e783e}
[2020-08-03T08:06:25,761][DEBUG][logstash.filters.grok ][events] Running grok filter {:event=>#LogStash::Event:0x433e783e}
[2020-08-03T08:06:25,769][DEBUG][logstash.filters.grok ][events] filters/LogStash::Filters::Grok: removing field {:field=>"accessManager"}
[2020-08-03T08:06:25,770][DEBUG][logstash.filters.grok ][events] Event now: {:event=>#LogStash::Event:0x433e783e}
[2020-08-03T08:06:25,784][DEBUG][logstash.filters.json ][events] Running json filter {:event=>#LogStash::Event:0x433e783e}
[2020-08-03T08:06:25,787][DEBUG][logstash.filters.json ][events] Event after json filter {:event=>#LogStash::Event:0x433e783e}
[2020-08-03T08:06:25,818][DEBUG][logstash.filters.grok ][events] Running grok filter {:event=>#LogStash::Event:0x433e783e}
[2020-08-03T08:06:25,822][DEBUG][logstash.filters.grok ][events] Event now: {:event=>#LogStash::Event:0x433e783e}
[2020-08-03T08:06:25,826][DEBUG][logstash.util.decorators ][events] filters/LogStash::Filters::GeoIP: adding value to field {"field"=>"countryCode", "value"=>["%{[geoIP][country_code2]}"]}
[2020-08-03T08:06:25,830][DEBUG][logstash.util.decorators ][events] filters/LogStash::Filters::Mutate: adding value to field {"field"=>"loginCount", "value"=>[1]}
[2020-08-03T08:06:25,831][DEBUG][logstash.util.decorators ][events] filters/LogStash::Filters::Mutate: adding value to field {"field"=>"deviceName", "value"=>["%{[os_name][0]}"]}
[2020-08-03T08:06:25,832][DEBUG][logstash.util.decorators ][events] filters/LogStash::Filters::Mutate: adding value to field {"field"=>"deviceID", "value"=>["idp%{B}"]}
[2020-08-03T08:06:25,833][DEBUG][logstash.util.decorators ][events] filters/LogStash::Filters::Mutate: adding value to field {"field"=>"sessionID", "value"=>["%{[Y][0]}"]}
[2020-08-03T08:06:25,834][DEBUG][logstash.util.decorators ][events] filters/LogStash::Filters::Mutate: adding value to field {"field"=>"authsid", "value"=>["%{[Y][1]}"]}
[2020-08-03T08:06:25,835][DEBUG][logstash.util.decorators ][events] filters/LogStash::Filters::Mutate: adding value to field {"field"=>"risklevel", "value"=>["null"]}
[2020-08-03T08:06:25,836][DEBUG][logstash.util.decorators ][events] filters/LogStash::Filters::Mutate: adding value to field {"field"=>"failedCount", "value"=>["null"]}
[2020-08-03T08:06:25,837][DEBUG][logstash.util.decorators ][events] filters/LogStash::Filters::Mutate: adding value to field {"field"=>"eventType", "value"=>["null"]}
I dont see any elasticsearch output related.
I have my input/filters/output config separate files with pipelines pointing to that directory. My pipeline.xml
OK, so documents are being written to the index. Is your issue just that there are not any DEBUG logs? If so, well, that is true. The manticore_adapter is passed the logger, but never uses it. pool.rb only logs when the pool of connections changes. The output itself does not log anything when processing events normally.
Thanks for the update. My requirement is to have logs even in case of successful indexing. We need that for troubleshooting. I thought logger.logstash.outputs.elasticsearch" : "DEBUG setting would help here. Is there any other way?
There is no per event logging in the elasticsearch output. It does maintain some metrics around the number of response to bulk request, but I cannot tell you anything about them or how to access them.
The elasticsearch output is built on top of cheald/manticore, and that is built on top of the Apache httpClient. I believe httpClient has logging but that is low level. (I do not know what version of httpClient the output is built upon.)
Ok . My overall requirement somehow I need to know logstash has received/processed events. Im happy even I will be able to print the event once it received in input or filter, even if not in output. Whole exercise is to make sure events are reaching logstash.
I tried to set logstash.inputs.syslog to DEBUG. I thought it will print event/log once it recieved. But it didn't
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.