You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the same configuration used on the inside { } configuration for logstash-input-redis does not work. The debug output shows the following:
Registering Redis {:identity=>"redis://@redis.example.com:12345:6379/0 list:logstash", :level=>:info, :file=>"logstash/inputs/redis.rb", :line=>"117", :method=>"register"}
Pipeline started {:level=>:info, :file=>"logstash/pipeline.rb", :line=>"87", :method=>"run"}
Logstash startup completed
A plugin had an unrecoverable error. Will restart this plugin.
Plugin: <LogStash::Inputs::Redis host=>"redis.example.com:12345", key=>"logstash", data_type=>"list", debug=>false, codec=><LogStash::Codecs::JSON charset=>"UTF-8">, threads=>1, name=>"default", port=>6379, db=>0, timeout=>5, batch_count=>1>
Error: initialize: name or service not known
Exception: SocketError
Stack: org/jruby/ext/socket/RubyTCPSocket.java:129:in `initialize'
Notice that it registers with redis://@redis.example.com:12345:6379/0, effectively treating the port as part of the host name.
The output plugin has the following line: @current_host, @current_port = @host[@host_idx].split(':') Something similar can be done with the input plugin.
Both the output and the input plugins need to be tweaked because the error message and the debug messages do not consistently represent the port variable. For instance if I do not set the port variable, the output plugins says @port = 6379 even though it uses port 12345 to connect:
As a logstash administrator, I want my configuration of logstash-input-redis to be consistent with logstash-output-redis as much as possible.
Problem
When I use the following
output { }
configuration for logstash-output-redis everything works:But the same configuration used on the
inside { }
configuration for logstash-input-redis does not work. The debug output shows the following:Notice that it registers with
redis://@redis.example.com:12345:6379/0
, effectively treating the port as part of the host name.The following code works in both places:
Solution
The output plugin has the following line:
@current_host, @current_port = @host[@host_idx].split(':')
Something similar can be done with the input plugin.Both the output and the input plugins need to be tweaked because the error message and the debug messages do not consistently represent the
port
variable. For instance if I do not set theport
variable, the output plugins says@port = 6379
even though it uses port12345
to connect:The text was updated successfully, but these errors were encountered: