We are building a Redis output configuration that pushes a large stack of data to Redis. The volume is so large that we want to set an EXPIRY for each key that is pushed to Redis. This is very important from both costs and maintanence perspective. I could not locate a setting in Logstash (6.4) on how I can do this.
The redis output plugin doesn't support this option and redis doesn't either. So I would say create a feature request.. I don's see any option to set a ttl on a key...
(to be complete)
redis does not support a default TTL on a db key set via a config file. of course it support the TTL on a per key basis..
yep Redis does support on a per-key basis. The scenario we're looking is pretty much like this - We're looking to expire ALL Keys over X days old (can be done on Redis) :
yeah I don't know how to do that without scan all the keys and update them with a expire setting. But reading your initial post that will be very costly in resources.
yeah that was the exact place i was thinking of doing this. Though It would be preferable to get this as part of an official release? since we'll have to rebuild the plugin each time we upgrade.
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.