# Filebeat unable to connect logstash server

**URL:** <https://discuss.elastic.co/t/filebeat-unable-to-connect-logstash-server/285137>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 25, 2021, 6:00pm UTC](https://discuss.elastic.co/t/filebeat-unable-to-connect-logstash-server/285137 "2021-09-25T18:00:54Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![zx8086](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zx8086/32/94917_2.png) [@zx8086](https://discuss.elastic.co/u/zx8086)\
**Post date:** [September 26, 2021, 11:31am UTC](https://discuss.elastic.co/t/filebeat-unable-to-connect-logstash-server/285137/22 "2021-09-26T11:31:33Z")

</div>

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.

```auto
# ================================= 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

```

```auto
# =================================== 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.

---

<div class="post-metadata">

**Author:** ![prat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prat/32/79978_2.png) [@prat](https://discuss.elastic.co/u/prat)\
**Post date:** [September 26, 2021, 12:01pm UTC](https://discuss.elastic.co/t/filebeat-unable-to-connect-logstash-server/285137/23 "2021-09-26T12:01:06Z")

</div>

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.

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

```

Thanks,

---

<div class="post-metadata">

**Author:** ![zx8086](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zx8086/32/94917_2.png) [@zx8086](https://discuss.elastic.co/u/zx8086)\
**Post date:** [September 26, 2021, 12:28pm UTC](https://discuss.elastic.co/t/filebeat-unable-to-connect-logstash-server/285137/24 "2021-09-26T12:28:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![prat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prat/32/79978_2.png) [@prat](https://discuss.elastic.co/u/prat)\
**Post date:** [September 26, 2021, 12:43pm UTC](https://discuss.elastic.co/t/filebeat-unable-to-connect-logstash-server/285137/25 "2021-09-26T12:43:42Z")

</div>

Exactly, thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 24, 2021, 2:44pm UTC](https://discuss.elastic.co/t/filebeat-unable-to-connect-logstash-server/285137/26 "2021-10-24T14:44:15Z")

</div>

Closed on October 24, 2021, 2:44pm UTC

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

[Previous page](https://discuss.elastic.co/t/filebeat-unable-to-connect-logstash-server/285137.md?page=1)
