# Filebeat not working

**URL:** <https://discuss.elastic.co/t/filebeat-not-working/86364>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 19, 2017, 6:10am UTC](https://discuss.elastic.co/t/filebeat-not-working/86364 "2017-05-19T06:10:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmane](https://avatars.discourse-cdn.com/v4/letter/n/a9adbd/32.png) [@nmane](https://discuss.elastic.co/u/nmane)\
**Post date:** [May 19, 2017, 6:10am UTC](https://discuss.elastic.co/t/filebeat-not-working/86364/1 "2017-05-19T06:10:01Z")

</div>

I am using filebeat and the data is passed to logstash. My filebeat code is:

filebeat.prospectors:

- input\_type: log  
paths:
  - etc\access.log  
fields: {log\_type: access}

I want to add multiple input files and create filters in logstash accordingly. Therefore, it is neccessary to give a type to each file. But when I write code till path filebeat works, if I try to add field to it the filebeat.exe closes at the moment i start it. Please tell me if I wrote a wrong code and why it is happening.

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [May 22, 2017, 5:20am UTC](https://discuss.elastic.co/t/filebeat-not-working/86364/2 "2017-05-22T05:20:45Z")

</div>

The way you should define fields is:

```auto
  fields:
    log_type: access

```

What are the { brackets supposed to do?

---

<div class="post-metadata">

**Author:** ![nmane](https://avatars.discourse-cdn.com/v4/letter/n/a9adbd/32.png) [@nmane](https://discuss.elastic.co/u/nmane)\
**Post date:** [May 22, 2017, 6:00am UTC](https://discuss.elastic.co/t/filebeat-not-working/86364/3 "2017-05-22T06:00:34Z")

</div>

It worked. 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:** [June 19, 2017, 6:00am UTC](https://discuss.elastic.co/t/filebeat-not-working/86364/4 "2017-06-19T06:00:48Z")

</div>

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