Mongodb logstash data input

After struggling for days, I finally connected mongodb and logstash.
But another problem arose.
I want to send only newly entered logs to the index using sql_last_value, but it doesn't work.
Is this impossible in Logstash?
Is there any other way?
statement => "db.t_log.find({Stamp:{$gt:sql_last_value }},{_id:0}).pretty()"

If you are using the mongodb input then no, it is not possible. It does not support sql_last_value. It expects to read every item in a collection except the first, and keeps track in its own sincedb. The first entry is consumed whilst initializing the sincedb and never returned to logstash.

thank you for the reply.
I looked up sincedb and it seems to be related to file. I am currently using jdbc among input-plugins. How can I synchronize mongodb data with elasticsearch when using jdbc?
is it impossible?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.