I can't give you the actual URL. Everything is working fine in parsing log data. The URL which I mentioned in http_poller is dynamic log data so every time I am running the URL it always starts from starting. I want to start from next to the previous log data which I executed last time. Is there is any way in logstash to do that?
for e.g. When I run the log file first time I getting the log data of 50 lines. After few minutes my dynamic log data contains 100 log line. I don't want to start again from 1 st line of my log data, I want to start from 51 st line of my log data.
I want to start from next to the previous log data which I executed last time. Is there is any way in logstash to do that?
No, but if you set the document id of the events you send to ES you will at least not get duplicates (because you'll overwrite the same event all the time).
You could e.g. set the document id to a hash of the event contents. You can use the fingerprint filter to generate the hash.
All documents in Elasticsearch have a unique id. See the ES documentation for details. The id of Logstash events sent to ES can be set via the elasticsearch output's document_id option. You can create a field in the event that contains the desired id and then reference that field in the output configuration.
For my understanding, I need to place a unique field of my log event in the fingerprint on both the target and document_id. (i.e ) target => "my unique field" and document_id => "my unique field"
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.