Add support for expiring records in mongodb
rahulraykor opened this issue · 2 comments
rahulraykor commented
-
This plugin is useful for storing log data from Fluentd into MongoDb
-
As we all know MongoDb is not suitable for large collection and logs will definitely will have a lot of data and records.
-
So we can provide support for creating expireIndex for MongoDb collection which will automatically clean records in MongoDb
-We can make this configurable using Fluentd config.
repeatedly commented
We can make this configurable using Fluentd config.
So mongo gem supports TTL parameter for the collection, right?
If you send a PR, we can review it.
cosmo0920 commented
MongoDB should handle expire_after
parameter with indexes not in collection:
https://docs.mongodb.com/ruby-driver/master/tutorials/ruby-driver-indexing/