Why file always get this error ,it makes puzzle two day


I just simply cofigure logstash and filebeat like follow:
filebeat :
#output.logstash:

The Logstash hosts

hosts: ["localhost:5043"],
and logstash :
input {
beats {
host => "localhost"
port => "5043" #注意要和filebeat的输出端口一致
}
}
output {
stdout { codec => rubydebug }
elasticsearch {
hosts => [ "localhost:9200" ]
}
}
Is there any thing wrong with this simply setting ,It almost make me crazy.

From the provided screenshot and filebeat config, it seems to me that you're passing localhost:5034 as the Elasticsearch host and not Logstash host.

you must uncomment the output.logstash: line before the hosts: line.

If this is not the case, please paste your full configuration again, this time wrapping it in a block quote (prefix every line with the > sign )

thx for apply,I find that I miss set filebeat.prospectors to be enable, so filebeat did not send logs.
after change it to enable I trouble with other problem .

while my cofigure file about filebeat.yml and logstash.conf is follow
snipaste20180125_180655snipaste20180125_180745snipaste20180125_180805
Could you help me check out what wrong with this

You still have the problem I pointed out in my previous message.

In filebeat.yml:

  • Need to comment the output.elasticsearch: line.
  • Need to uncomment the output.logstash: line.

Your config must look like:

#-------------------------- Elasticsearch output ------------------------------
#output.elasticsearch: # COMMENTED THIS LINE
  # Array of hosts to connect to.
  # hosts: ["localhost:9200"]

  # Optional protocol and basic auth credentials.
  #protocol: "https"
  #username: "elastic"
  #password: "changeme"

#----------------------------- Logstash output --------------------------------
output.logstash: # UNCOMMENTED THIS LINE
  # The Logstash hosts
  hosts: ["10.254.102.99:5044"]

oh ~ Thank you very much.It works like a magic!!!!!!!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.