Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
## 3.1.0
- breaking,config: Remove deprecated config `queue`. Please use `key` and `data_type`.
- breaking,config: Remove deprecated config `name`.

## 3.0.1
- Republish all the gems under jruby.
- Republish all the gems under jruby.

## 3.0.0
- Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141
# 2.0.6
- make integration tests more reliable because of occasional travis failures
# 2.0.5
- Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
# 2.0.4
- New dependency requirements for logstash-core for the 5.0 release
- Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141

## 2.0.6
- make integration tests more reliable because of occasional travis failures

## 2.0.5
- Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash

## 2.0.4
- New dependency requirements for logstash-core for the 5.0 release

## 2.0.3
- Changed default batch size to 125. Improve batch handling code. Add travis ci build with redis integration.

Expand All @@ -19,7 +28,7 @@
## 1.0.3
- Fix typo in module name in test (Causing CI build failures)

## 1.0.2
## 1.0.2
- Fix typo in module name (Causing the module to not be loaded)

## 1.0.1
Expand Down
32 changes: 3 additions & 29 deletions lib/logstash/inputs/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ module LogStash module Inputs class Redis < LogStash::Inputs::Threadable

default :codec, "json"

# The `name` configuration is used for logging in case there are multiple instances.
# This feature has no real function and will be removed in future versions.
config :name, :validate => :string, :default => "default", :deprecated => true

# The hostname of your Redis server.
config :host, :validate => :string, :default => "127.0.0.1"

Expand All @@ -42,16 +38,13 @@ module LogStash module Inputs class Redis < LogStash::Inputs::Threadable
# Password to authenticate with. There is no authentication by default.
config :password, :validate => :password

# The name of the Redis queue (we'll use BLPOP against this).
config :queue, :validate => :string, :deprecated => true

# The name of a Redis list or channel.
config :key, :validate => :string, :required => false
config :key, :validate => :string, :required => true

# Specify either list or channel. If `redis\_type` is `list`, then we will BLPOP the
# key. If `redis\_type` is `channel`, then we will SUBSCRIBE to the key.
# If `redis\_type` is `pattern_channel`, then we will PSUBSCRIBE to the key.
config :data_type, :validate => [ "list", "channel", "pattern_channel" ], :required => false
config :data_type, :validate => [ "list", "channel", "pattern_channel" ], :required => true

# The number of events to return from Redis using EVAL.
config :batch_count, :validate => :number, :default => 125
Expand All @@ -77,24 +70,6 @@ def new_redis_instance
def register
@redis_url = "redis://#{@password}@#{@host}:#{@port}/#{@db}"

# TODO remove after setting key and data_type to true
if @queue
if @key || @data_type
raise RuntimeError.new(
"Cannot specify queue parameter and key or data_type"
)
end
@key = @queue
@data_type = 'list'
end

if !@key || !@data_type
raise RuntimeError.new(
"Must define queue, or key and data_type parameters"
)
end
# end TODO

@redis_builder ||= method(:internal_redis_builder)

# just switch on data_type once
Expand All @@ -111,8 +86,7 @@ def register

@list_method = batched? ? method(:list_batch_listener) : method(:list_single_listener)

# TODO(sissel, boertje): set @identity directly when @name config option is removed.
@identity = @name != 'default' ? @name : "#{@redis_url} #{@data_type}:#{@key}"
@identity = "#{@redis_url} #{@data_type}:#{@key}"
@logger.info("Registering Redis", :identity => @identity)
end # def register

Expand Down
2 changes: 1 addition & 1 deletion logstash-input-redis.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|

s.name = 'logstash-input-redis'
s.version = '3.0.1'
s.version = '3.1.0'
s.licenses = ['Apache License (2.0)']
s.summary = "This input will read events from a Redis instance"
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
Expand Down