-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for REDIS ZSET #46
base: main
Are you sure you want to change the base?
Conversation
This commit adds support for ZSET queues in REDIS with data_type 'list'. Batch is supported. Priority is based on a field of the message containing a number. If the field is absent or not a number a default priority is then used. It adds the following options to the configuration: * **priority**: *boolean*, default false, enable priority mode * **priority_field**: *string*, default '@timestamp', Priority field to use, if field doesn't exist, priority will be priority_default * **priority_default**: *number*, default '0', Default priority when priority field is not found in the event Usage example: output { redis { host => ["127.0.0.1"] port => 6379 data_type => "list" key => "syslog" priority => true priority_field => "epoch" } }
This pull request is linked to logstash-plugins/logstash-input-redis#56 |
@amaury-d Can you please add some rspec tests for these changes? This is a rather significant update and some tests are absolutely necessary. |
@untergeek Sure, i'll work on it and update the pull request |
Sometimes redis didn't have the time to ingest all messages and the test fails randomly. It appeared it was due to redis too short timeout.
As sorted sets are a native redis data type, it's best to support ZSET through data_type option instead to boolean priority option. A first group of integration tests (batched and unbatched) for sorted sets is also added with this commit.
This commit adds support for ZSET queues in REDIS with data_type 'list'. Batch is supported. Priority is based on a field of the message containing a number. If the field is absent or not a number a default priority is then used. It adds the following options to the configuration: * **priority**: *boolean*, default false, enable priority mode * **priority_field**: *string*, default '@timestamp', Priority field to use, if field doesn't exist, priority will be priority_default * **priority_default**: *number*, default '0', Default priority when priority field is not found in the event Usage example: output { redis { host => ["127.0.0.1"] port => 6379 data_type => "list" key => "syslog" priority => true priority_field => "epoch" } }
Sometimes redis didn't have the time to ingest all messages and the test fails randomly. It appeared it was due to redis too short timeout.
As sorted sets are a native redis data type, it's best to support ZSET through data_type option instead to boolean priority option. A first group of integration tests (batched and unbatched) for sorted sets is also added with this commit.
Hi @untergeek @andrewvc , rspec tests and supplementary documentation have been added to pull requests (input and output). |
Hello, How can I download you changes? I need them also Thanks |
@zivziv77 just go on my github or check the diff of that pull request |
Thanks, why not putting it in master and have it in the official release? |
Would you be nice and explain to me step step how can I install it on prod
machine?
…On Tue, 26 Jun 2018 at 19:19 Amaury Decreme ***@***.***> wrote:
@zivziv77 <https://github.com/zivziv77> just go on my github or check the
diff of that pull request
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#46 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALyLUPXbM9vdPMckMhGMLfkgvC5A4Cfpks5uAl8XgaJpZM4L5bFX>
.
|
@amaury-d Does it supports NX/XX options along with ZADD command ? |
This commit adds support for ZSET queues in REDIS with data_type
sortedset
.Batch is supported.
Priority is based on a field of the message containing a number.
If the field is absent or not a number a default priority is then used.
It adds the following options to the configuration:
use, if field doesn't exist, priority will be priority_default
priority field is not found in the event
Usage example:
=> The messages will be push to a sortedset with the key
syslog
using the content of the fieldmyepochfield
as score.Thanks for contributing to Logstash! If you haven't already signed our CLA, here's a handy link: https://www.elastic.co/contributor-agreement/