Hi,
I'm trying to add redis as a buffer to my stack in docker-compose. My logstash.conf input section is like below:
input {
redis {
host => "redistest"
port => "6379"
ssl => false
data_type => "list"
key => "All"
batch_count => 512
threads => 1
timeout=> 10
codec=> "json"
enable_metric=> false
db => 0
}
udp {
port => 5001
codec => json
}
}
In logstash container logs i see info messages like this:
[2021-11-03T12:16:14,688][INFO ][logstash.inputs.redis ][main] Registering Redis {:identity=>"redis://@redistest:6379/0 list:All"}
[2021-11-03T12:16:14,709][INFO ][logstash.javapipeline ][main] Pipeline started {"pipeline.id"=>"main"}
[2021-11-03T12:16:14,802][INFO ][logstash.inputs.udp ][main][94cfabea21d6fd5f7e789580a25bbdeb9c8fd00fe42e823be411985d9d286432] Starting UDP listener {:address=>"0.0.0.0:5001"}
[2021-11-03T12:16:14,872][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2021-11-03T12:16:14,909][INFO ][logstash.inputs.udp ][main][94cfabea21d6fd5f7e789580a25bbdeb9c8fd00fe42e823be411985d9d286432] UDP listener started {:address=>"0.0.0.0:5001", :receive_buffer_bytes=>"106496", :queue_size=>"2000"}
[2021-11-03T12:16:15,331][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
I'm using syslog test message utility tool to test and when I send from port 5001 i receive the logs. However when I use the redis port I dont receive any logs. There's also no error messages or whatsoever in container logs. I am able to monitor traffic on port 6379 via tcpdump so no problems networkwise.
Things I tried:
- Creating a custom logstash image where i expose the port 6379
- Adding redis dependency to logstash in docker-compose
- Specifying 6379 as both tcp and udp under redis ports in docker-compose
None of these seem to help. Is there something I'm missing? Thanks in advance.