# How to accept logs from FileBeat in Logstash?

**URL:** <https://discuss.elastic.co/t/how-to-accept-logs-from-filebeat-in-logstash/231508>\
**Category:** Logstash\
**Created:** [May 7, 2020, 10:19am UTC](https://discuss.elastic.co/t/how-to-accept-logs-from-filebeat-in-logstash/231508 "2020-05-07T10:19:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vlad\_Piratov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vlad_piratov/32/66523_2.png) [@Vlad\_Piratov](https://discuss.elastic.co/u/Vlad_Piratov)\
**Post date:** [May 7, 2020, 10:19am UTC](https://discuss.elastic.co/t/how-to-accept-logs-from-filebeat-in-logstash/231508/1 "2020-05-07T10:19:58Z")

</div>

Hi! How do you accept logs from Filebeam in Logstash? I have configured configurations in the yml file for output in Logstash.. In the settings, Logstash specified that without a filter, logs go directly to elasticsearch.  
But something goes wrong and it doesn't give out indexes as if I were giving them directly to elasticsearch. All indexes are not reached.  
The question is more about how you do it. If you don't mind show us some examples of configurations 🙂

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 7, 2020, 11:43pm UTC](https://discuss.elastic.co/t/how-to-accept-logs-from-filebeat-in-logstash/231508/2 "2020-05-07T23:43:01Z")

</div>

> [@Vlad\_Piratov](#):
>
> But something goes wrong and it doesn't give out indexes as if I were giving them directly to elasticsearch. All indexes are not reached.

It's not clear what you mean by that sorry.

Can you post your config?

---

<div class="post-metadata">

**Author:** ![Vlad\_Piratov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vlad_piratov/32/66523_2.png) [@Vlad\_Piratov](https://discuss.elastic.co/u/Vlad_Piratov)\
**Post date:** [May 8, 2020, 11:22am UTC](https://discuss.elastic.co/t/how-to-accept-logs-from-filebeat-in-logstash/231508/3 "2020-05-08T11:22:25Z")

</div>

```
# Sample Logstash configuration for creating a simple
# Beats -> Logstash -> Elasticsearch pipeline.

input {
  beats {
port => 5044
  }
}

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}"]
}
date {
  match => ["syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss"]
}
  }
}

output {
  elasticsearch {
    hosts => ["192.168.10.183:9200"]
    sniffing => true
    manage_template => false
    index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
    document_type => "%{[@metadata][type]}"
  }
	  stdout {}
}
```

---

<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:** [June 5, 2020, 11:22am UTC](https://discuss.elastic.co/t/how-to-accept-logs-from-filebeat-in-logstash/231508/4 "2020-06-05T11:22:25Z")

</div>

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