Error: The setting `host` in plugin `elasticsearch` is obsolete and is no longer available. Please use the 'hosts' setting instead. You can specify multiple entries separated by comma in 'host:port' format


(reject) #1

/opt/logstash/bin/logstash -f /etc/logstash/conf.d/logstash_test.conf

test.conf:
input {
stdin{}
}

output {
elasticsearch { host => localhost }

stdout {
    codec => rubydebug
}

}

why this error?plz.thanks.


(Mark Walkom) #2

It explains it in the error - The settinghostin pluginelasticsearchis obsolete and is no longer available. Please use the 'hosts' setting instead.

Check the docs - https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts


(vani) #3

replace elasticsearch {host => localhost} to elasticsearch { hosts => "localhost"}


(system) #4