Logstash can not output redis data to ElasticSearch


(tongwencong) #1

my logstash.conf:
input {
redis {
host => "10.57.147.83"
port => "6379"
key => "logstash"
data_type => "list"
codec => "json"
type => "logstash-redis-demo"
tags => ["logstashdemo"]
}
}

output {
elasticsearch {
host => localhost
port => 9200
}
}

my ElasticSearch version:1.6.0
my logstash version:2.1.1
when I run cmd ,it error:
D:\Program Files\logstash-2.1.1\bin>logstash -f ../logstash.conf
io/console not supported; tty will not be manipulated
Error: The setting host in plugin elasticsearch is obsolete and is no longer
available. Please use the 'hosts' setting instead. You can specify multiple ent
ries separated by comma in 'host:port' format. If you have any questions about t
his, you are invited to visit https://discuss.elastic.co/c/logstash and ask.
You may be interested in the '--configtest' flag which you can
use to validate logstash's configuration before you choose
to restart a running system.


(Magnus B├Ąck) #2

As the error message says,

The setting host in plugin elasticsearch is obsolete and is no longer
available. Please use the 'hosts' setting instead.

use the hosts option to set which Elasticsearch host(s) to use.


(tongwencong) #3

I use this success:
output {
elasticsearch {
hosts => ["10.57.147.83:9200"]
}
}


(system) #4