# Filebeat not connected to Logstash as per my understanding

**URL:** <https://discuss.elastic.co/t/filebeat-not-connected-to-logstash-as-per-my-understanding/159543>\
**Category:** Elasticsearch\
**Created:** [December 5, 2018, 1:15pm UTC](https://discuss.elastic.co/t/filebeat-not-connected-to-logstash-as-per-my-understanding/159543 "2018-12-05T13:15:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashvinanto](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@ashvinanto](https://discuss.elastic.co/u/ashvinanto)\
**Post date:** [December 5, 2018, 1:15pm UTC](https://discuss.elastic.co/t/filebeat-not-connected-to-logstash-as-per-my-understanding/159543/1 "2018-12-05T13:15:34Z")

</div>

Hi,

I have configured filebeat to harvest logs from a certain path. And the same logs can be discovered in Kibana. However, I wanted to parse the logs which is obtained in message field in kibana. For that I was trying to use Logstash confgurations. In that I have specified port as 5044 for input under assumption that the input from filebeats will reach logstash (Is my assumption correct?). If yes, how can I confirm whether the data has reached logstash. I am using grok filter in logstash to parse the incoming log file.

---

<div class="post-metadata">

**Author:** ![ashvinanto](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@ashvinanto](https://discuss.elastic.co/u/ashvinanto)\
**Post date:** [December 5, 2018, 1:16pm UTC](https://discuss.elastic.co/t/filebeat-not-connected-to-logstash-as-per-my-understanding/159543/2 "2018-12-05T13:16:28Z")

</div>

logstash.config:-

# Sample Logstash configuration for creating a simple

# Beats -\> Logstash -\> Elasticsearch pipeline.

input  
{

beats {  
port =\>5044

```
	}

```

}

filter{  
grok  
{  
match =\> { "message" =\> "%{TIMESTAMP\_ISO8601:ASHVIN}"}

```
}
}

```

output {  
elasticsearch {  
hosts =\> ["[http://localhost:9200](http://localhost:9200)"]  
manage\_template =\> false  
index =\> "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"

}  
stdout {}  
}

---

<div class="post-metadata">

**Author:** ![ashvinanto](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@ashvinanto](https://discuss.elastic.co/u/ashvinanto)\
**Post date:** [December 5, 2018, 1:16pm UTC](https://discuss.elastic.co/t/filebeat-not-connected-to-logstash-as-per-my-understanding/159543/3 "2018-12-05T13:16:54Z")

</div>

###################### Filebeat Configuration Example #########################

# This file is an example configuration file highlighting only the most common

# options. The filebeat.reference.yml file from the same directory contains all the

# supported options with more comments. You can use it as a reference.

# 

# You can find the full configuration reference here:

# [https://www.elastic.co/guide/en/beats/filebeat/index.html](https://www.elastic.co/guide/en/beats/filebeat/index.html)

# For more available modules and options, please see the filebeat.reference.yml sample

# configuration file.

#=========================== Filebeat inputs =============================

filebeat.inputs:

# Each - is an input. Most options can be set at the input level, so

# you can use different inputs for various configurations.

# Below are the input specific configurations.

- type: log

#============================= Filebeat modules ===============================

filebeat.config.modules:

# Glob pattern for configuration loading

path: ${path.config}/modules.d/\*.yml

# Set to true to enable config reloading

reload.enabled: false

# Period on which files under path should be checked for changes

reload.period: 10s

#==================== Elasticsearch template setting ==========================

setup.template.settings:  
index.number\_of\_shards: 3  
#index.codec: best\_compression  
#\_source.enabled: false

#================================ General =====================================

# The name of the shipper that publishes the network data. It can be used to group

# all the transactions sent by a single shipper in the web interface.

#name:

# The tags of the shipper are included in their own field with each

# transaction published.

#tags: ["service-X", "web-tier"]

# Optional fields that you can specify to add additional information to the

# output.

#fields:

# env: staging

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

# These settings control loading the sample dashboards to the Kibana index. Loading

# the dashboards is 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: true

# The URL from where to download the dashboards archive. By default this URL

# has a value which is computed based on the Beat name and version. For released

# versions, this URL points to the dashboard archive on the [artifacts.elastic.co](http://artifacts.elastic.co)

# website.

#setup.dashboards.url:

#============================== 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](http://localhost:5601/path)

# IPv6 addresses should always be defined as: https://[2001:db8::1]:5601

#host: "localhost:5601"

# Kibana Space ID

# ID of the Kibana Space into which the dashboards should be loaded. By default,

# the Default Space will be used.

#space.id:

#============================= Elastic Cloud ==================================

# These settings simplify using filebeat with the Elastic Cloud ([https://cloud.elastic.co/](https://cloud.elastic.co/)).

# The cloud.id setting overwrites the `output.elasticsearch.hosts` and

# `setup.kibana.host` options.

# You can find the `cloud.id` in the Elastic Cloud web UI.

#cloud.id:

# The cloud.auth setting overwrites the `output.elasticsearch.username` and

# `output.elasticsearch.password` settings. The format is `<user>:<pass>`.

#cloud.auth:

#================================ Outputs =====================================

# Configure what output to use when sending the data collected by the beat.

#-------------------------- Elasticsearch output ------------------------------  
#output.elasticsearch:

# Array of hosts to connect to.

#hosts: ["localhost:9200"]  
#pipeline: test

# Optional protocol and basic auth credentials.

#protocol: "https"  
#username: "elastic"  
#password: "changeme"

#----------------------------- Logstash output --------------------------------  
output.logstash:  
#The Logstash hostss  
hosts: ["localhost:9601"]

# Optional SSL. By default is off.

# List of root certificates for HTTPS server verifications

#ssl.certificate\_authorities: ["/etc/pki/root/ca.pem"]

# Certificate for SSL client authentication

#ssl.certificate: "/etc/pki/client/cert.pem"

# Client Certificate Key

#ssl.key: "/etc/pki/client/cert.key"

#================================ Procesors =====================================

# Configure processors to enhance or manipulate events generated by the beat.

processors:

- add\_host\_metadata: ~
- add\_cloud\_metadata: ~

#================================ Logging =====================================

# Sets log level. The default log level is info.

# Available log levels are: error, warning, info, debug

#logging.level: debug

# At debug level, you can selectively enable logging only for some components.

# To enable all selectors use ["\*"]. Examples of other selectors are "beat",

# "publish", "service".

#logging.selectors: ["\*"]

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 5, 2018, 1:44pm UTC](https://discuss.elastic.co/t/filebeat-not-connected-to-logstash-as-per-my-understanding/159543/4 "2018-12-05T13:44:38Z")

</div>

> [@ashvinanto](#):
>
> hosts: ["localhost:9601"]

> [@ashvinanto](#):
>
> port =\>5044

This does not seem to match, which might explain why you are seeing connection problems.

---

<div class="post-metadata">

**Author:** ![ashvinanto](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@ashvinanto](https://discuss.elastic.co/u/ashvinanto)\
**Post date:** [December 6, 2018, 3:58am UTC](https://discuss.elastic.co/t/filebeat-not-connected-to-logstash-as-per-my-understanding/159543/5 "2018-12-06T03:58:54Z")

</div>

Hiii Christian... Yes thanks for noting that.. actually, I had given the same port connection initially.. but later I changed it for troubleshooting..

Please find the following output:-  
C:\Program Files\Filebeat\>filebeat test output  
logstash: localhost:9600...  
connection...  
parse host... OK  
dns lookup... OK  
addresses: ::1, 127.0.0.1  
dial up... ERROR dial tcp [::1]:9600: connectex: No connection could be made because the target machine actively refused it.

I understand that the filebeat to logstash connection is not established.

Also please note that in logstash.config:-

# Sample Logstash configuration for creating a simple

# Beats -\> Logstash -\> Elasticsearch pipeline.

input  
{

beats {  
port =\>5044

```
	}

```

}

filter{  
grok  
{  
match =\> { "message" =\> "%{TIMESTAMP\_ISO8601:ASHVIN}"}

```
}
}

```

output {  
elasticsearch {  
hosts =\> ["[http://localhost:9200](http://localhost:9200)"]  
manage\_template =\> false  
index =\> "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"

}  
stdout {}  
}

input to logstash is defined at port 5044.. is this the right port for filebeat??

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 6, 2018, 8:08am UTC](https://discuss.elastic.co/t/filebeat-not-connected-to-logstash-as-per-my-understanding/159543/6 "2018-12-06T08:08:18Z")

</div>

Yes, you should specify the port used in the beats input plugin (5044), not 9600.

---

<div class="post-metadata">

**Author:** ![ashvinanto](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@ashvinanto](https://discuss.elastic.co/u/ashvinanto)\
**Post date:** [December 6, 2018, 9:18am UTC](https://discuss.elastic.co/t/filebeat-not-connected-to-logstash-as-per-my-understanding/159543/7 "2018-12-06T09:18:15Z")

</div>

But when i try to ping port 5044 or either try accessing the port 5044, I am unable to do that

---

<div class="post-metadata">

**Author:** ![ashvinanto](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@ashvinanto](https://discuss.elastic.co/u/ashvinanto)\
**Post date:** [December 6, 2018, 9:18am UTC](https://discuss.elastic.co/t/filebeat-not-connected-to-logstash-as-per-my-understanding/159543/8 "2018-12-06T09:18:30Z")

</div>

what can i understand from that?

---

<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:** [January 3, 2019, 9:18am UTC](https://discuss.elastic.co/t/filebeat-not-connected-to-logstash-as-per-my-understanding/159543/9 "2019-01-03T09:18:36Z")

</div>

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