Filebeat unable to connect logstash server

You don't need to change either configuration option from what is default in the filebeat.yml file, IF you are going to run the setup command from the command line.

Here are examples from my setup.

# ================================= Dashboards =================================

# These settings control loading the sample dashboards to the Kibana index. Loading
# the dashboards are disabled by default and can be enabled either by setting the
# options here, or by using the `-setup` CLI flag or the `setup` command.
#setup.dashboards.enabled: false

# =================================== Kibana ===================================

# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
# This requires a Kibana endpoint configuration.
setup.kibana:

  # Kibana Host
  # Scheme and port can be left out and will be set to the default (http and 5601)
  # In case you specify and additional path, the scheme is required: http://localhost:5601/path
  # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
  host: "{{kibana_url}}"

  # # Optional protocol and basic auth credentials.
  protocol: "{{kibana_protocol}}"
  
  username: "{{elastic_username}}"
  password: "{{elastic_password}}"

You can specify multiple kibana hosts like you do Elasticsearch & logstash hosts. For me personally, my kibana url is a nginx reverse proxy url so I have more control within our environment.

Hi @zx8086,

May be i am missing imp thing here but still i not understand if we are loading filebeat dashboards etc.. via command line then why do we need to add below lines in filebeat.yml file.

setup.kibana:
  host: "http://10.20.x.1:5601"
  username: elastic
  password: ${es_pwd}

Thanks,

You don't IF you are running the setup via the command line. The values you pass on the command line override what is in the filebeat.yml

Exactly, thank you.

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