How to remove transferred logs with Logstash?

I want to use Logstash to move my log files from Mongodb to Elasticsearch. Is there any option to remove transferred logs from mongo?

Hello Vladimir,

Unfortunately, I think this is not possible directly. Although the elasticsearch output has this option this option is not added to the mongodb output (see open issue here).

If you really need a logstash pipeline to delete the logs you could be writing a small pipeline reading from elasticsearch and use the exec output plugin to run a script that deletes the entries.

Best regards
Wolfram

1 Like

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