Eu reiniciei o Redis e o Logstash e depois disso tudo começou a funcionar de repente. Lição aprendida: nunca subestime o poder de reiniciar!
Não posso enviar logs do Logstash para o servidor Redis. Obtendo este erro:
Failed to send event to redis {:event=>#<LogStash::Event:0x7ccb7867 @cancelled=false, @data={"message"=>"welocwelcome", "@timestamp"=>"2014-07-07T21:00:34.583Z", "@version"=>"1", "host"=>"localhost.localdomain"}>, :identity=>"default", :exception=>#<Errno::EHOSTUNREACH: No route to host - SocketChannel.connect>, :backtrace=>["org/jruby/ext/socket/RubyTCPSocket.java:123:in 'initialize'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:13:in 'initialize'", "org/jruby/RubyIO.java:855:in 'new'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:74:in 'connect'", "org/jruby/ext/timeout/Timeout.java:127:in 'timeout'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:73:in 'connect'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:180:in 'connect'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:273:in 'establish_connection'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:69:in 'connect'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:292:in 'ensure_connected'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:179:in 'process'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:258:in 'logging'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:178:in 'process'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:84:in 'call'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:972:in 'rpush'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:36:in 'synchronize'", "jar:file:/opt/logstash/logstash-1.2.2-flatjar.jar!/META-INF/jruby.home/lib/ruby/1.9/monitor.rb:211:in 'mon_synchronize'", "jar:file:/opt/logstash/logstash-1.2.2-flatjar.jar!/META-INF/jruby.home/lib/ruby/1.9/monitor.rb:210:in 'mon_synchronize'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:36:in 'synchronize'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:971:in 'rpush'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/outputs/redis.rb:162:in 'receive'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/outputs/base.rb:85:in 'handle'", "(eval):21:in 'initialize'", "org/jruby/RubyProc.java:271:in 'call'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:254:in 'output'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:213:in 'outputworker'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:140:in 'start_outputs'"], :level=>:warn}
Este é o conteúdo do meu arquivo de configuração do logstash:
input { stdin { } }
output {
stdout { codec => rubydebug }
redis { host => "192.168.209.129" data_type => "list" key => "logstash" }
}
Tags syslog