# No connections between logstash and filebeats

**URL:** <https://discuss.elastic.co/t/no-connections-between-logstash-and-filebeats/173895>\
**Category:** Beats\
**Created:** [March 26, 2019, 9:31am UTC](https://discuss.elastic.co/t/no-connections-between-logstash-and-filebeats/173895 "2019-03-26T09:31:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dragan979](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dragan979/32/42739_2.png) [@dragan979](https://discuss.elastic.co/u/dragan979)\
**Post date:** [March 26, 2019, 9:31am UTC](https://discuss.elastic.co/t/no-connections-between-logstash-and-filebeats/173895/1 "2019-03-26T09:31:29Z")

</div>

Today is second day i'm spending on ELK stack and have no any experience with this.

My goal:

Create "parent" index (client01) and for all machines related to client01 collect logs so i can filter data based on that "parent" index.

filebeat sends log to logstash, logstash sends it to elasticsearch-serach index from KIBANA

elasticsearch,kibana and filebeat are on the same machine

In elasticsearch created cluster01 index

 ![2](https://us1.discourse-cdn.com/elastic/original/3X/7/4/745148c91d117d71d259d30d6efe841627da69e8.png) (no mapping)

i can telnet to ports 9200 and 5044

```
logstash_simple.conf

input {
  beats {
    port => 5044
    #ssl => true
    #ssl_certificate => "/etc/pki/tls/certs/logstash.crt"
    #ssl_key => "/etc/pki/tls/private/logstash.key"
  }
}

#filter {
# if [type] == "syslog" {
# grok {
# match => {
# "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}"
# }
# add_field => ["received_at", "%{@timestamp}"]
# add_field => ["received_from", "%{host}"]
# }
# syslog_pri { }
# date {
# match => ["syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss"]
# }
# }
#}

output {
    elasticsearch {
        hosts => "localhost:9200"
        index => "client01-logfiles-%{[beat.version]}-%{+YYYY.MM.dd}"
    }
}

```

i set basic configuration to get it working and to understand basic concepts

logstash.yml

```
- type: log

      # Change to true to enable this input configuration.
      enabled: true

      # Paths that should be crawled and fetched. Glob based paths.
      paths:
        - /var/log/audit/audit.log

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

```

filebeat -e -c /etc/filebeat/filebeat.yml

```
  ERROR pipeline/output.go:100 Failed to connect to backoff(elasticsearch(http://localhost:5044)): Get http://localhost:5044: read tcp 127.0.0.1:50202->127.0.0.1:5044: read: connection reset by peer
2019-03-26T09:19:33.805Z INFO pipeline/output.go:93 Attempting to reconnect to backoff(elasticsearch(http://localhost:5044)) with 2 reconnect attempt(s)
```

---

<div class="post-metadata">

**Author:** ![dragan979](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dragan979/32/42739_2.png) [@dragan979](https://discuss.elastic.co/u/dragan979)\
**Post date:** [March 26, 2019, 10:09am UTC](https://discuss.elastic.co/t/no-connections-between-logstash-and-filebeats/173895/2 "2019-03-26T10:09:25Z")

</div>

Solved, forgot to put # in front of  
output.elasticsearch:

---

<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:** [April 23, 2019, 12:09pm UTC](https://discuss.elastic.co/t/no-connections-between-logstash-and-filebeats/173895/3 "2019-04-23T12:09:26Z")

</div>

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