logstash-plugins / logstash-output-file

Apache License 2.0
23 stars 53 forks source link

Logstash and redis (file output may not be flushing on write) #11

Open jordansissel opened 9 years ago

jordansissel commented 9 years ago

(This issue was originally filed by @n1njai at https://github.com/elastic/logstash/issues/2436)


Hi, I am trying to use logstash 1.4.2 with redis, I wrote application on Java, which writes logs to Redis, and then logstash read them and wrote to file. I wrote 5000 logs to Redis, but when I am doing:

cat logstash_output | wc -l

I didn't see all logs. I checked it twice and saw 4992 and 4995 logs. It seems that some logs was lost.
My logstash config is:

input {
    redis {
        codec => json
        host => "192.26.10.11"
        port => 6379
        key => "logstash"
       data_type => "list"
    }
}
output {
   file {
      path => "/tmp/logstash_output"
   }
}