Unknow this error

I have a file logstash.conf

input {
beats {
port => 5044

output {
elasticsearch {
hosts => "localhost:9200"
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"

when i use command

/opt/logstash/bin/logstash --configtest -f /etc/logstash/conf.d/logstash.conf --> Error

Pls, show me where my wrong

p/s: i install Elasticsearch on server with IP 10.151.130. 1

Well, what's the exact error? If you're running Logstash 2.3, see the issue below.

Well, this is report when i debug this file

Unknown setting 'hosts' for elasticsearch {:level=>:error}
Error: Something is wrong with your configuration.

Please consult the documentation of your version of Logstash. You'll see that there is no hosts option (but there is a host option that works almost the same).