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

/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.

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

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

1 Like