# Filebeats on ElasticBean Stalk

**URL:** <https://discuss.elastic.co/t/filebeats-on-elasticbean-stalk/35171>\
**Category:** Beats\
**Created:** [November 20, 2015, 5:05pm UTC](https://discuss.elastic.co/t/filebeats-on-elasticbean-stalk/35171 "2015-11-20T17:05:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathew\_Mathew](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@Mathew\_Mathew](https://discuss.elastic.co/u/Mathew_Mathew)\
**Post date:** [November 20, 2015, 5:05pm UTC](https://discuss.elastic.co/t/filebeats-on-elasticbean-stalk/35171/1 "2015-11-20T17:05:56Z")

</div>

Trying to setup filebeats on elastic bean stalk to forward to the AWS Elasticsearch service.  
Getting this error when I try to start filebeats.

Starting filebeat: 2015/11/20 17:01:23.891713 main.go:42: CRIT Config error: Error reading config file: YAML config parsing failed on /etc/filebeat/filebeat.yml: yaml: unmarshal errors:  
line 7: cannot unmarshal !!map into []config.ProspectorConfig. Exiting.

-- This by elasticbean stalk .ebextension file. Installing the filebeats service

```
files:
    "/etc/filebeat/filebeat.yml":
        mode: "000755"
        owner: root
        group: root
        content: |
            filebeat:
                # List of prospectors to fetch data.
                prospectors:
                # Each - is a prospector. Below are the prospector specific configurations
                # Paths that should be crawled and fetched. Glob based paths.
                # For each file found under this path, a harvester is started.
                    paths:
                        - "/var/log/eb-docker/containers/eb-current-app/*.log"
                    input_type: log

            output:
                ### Elasticsearch as output
                elasticsearch:
                    # Array of hosts to connect to.
                    # Scheme and port can be left out and will be set to the default (http and 9200)
                    # In case you specify and additional path, the scheme is required: http://localhost:9200/path
                    # IPv6 addresses should always be defined as: https://[2001:db8::1]:9200
                    hosts: ["search-XXXXX-w4peuekyqtmgn4ofx25co6a7ne.eu-west-1.es.amazonaws.com:80"]

            logging:
                to_files: true
                files:
                    path: "/var/log/mybeat"
                    rotateeverybytes: 10485760

commands:
  1_command:
     command: "curl -L -O https://download.elastic.co/beats/filebeat/filebeat-1.0.0-rc2-x86_64.rpm"
     cwd: /home/ec2-user
  2_command:
     command: "rpm -ivh --replacepkgs filebeat-1.0.0-rc2-x86_64.rpm"
     cwd: /home/ec2-user
  3_command:
     command: "/etc/init.d/filebeat start"
```

---

<div class="post-metadata">

**Author:** ![tudor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tudor/32/3753_2.png) [@tudor](https://discuss.elastic.co/u/tudor)\
**Post date:** [November 20, 2015, 5:35pm UTC](https://discuss.elastic.co/t/filebeats-on-elasticbean-stalk/35171/2 "2015-11-20T17:35:23Z")

</div>

I noticed a missing `-` in the configuration of filebeat. You need a correctly indented `-` to start each prospector section, see the example [here](https://github.com/elastic/filebeat/blob/master/etc/filebeat.yml#L8).

---

<div class="post-metadata">

**Author:** ![khalid2009](https://avatars.discourse-cdn.com/v4/letter/k/898d66/32.png) [@khalid2009](https://discuss.elastic.co/u/khalid2009)\
**Post date:** [March 24, 2016, 6:33pm UTC](https://discuss.elastic.co/t/filebeats-on-elasticbean-stalk/35171/3 "2016-03-24T18:33:42Z")

</div>

Thank you. Found the right answer at the right time.

---

<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:** [July 5, 2017, 9:54pm UTC](https://discuss.elastic.co/t/filebeats-on-elasticbean-stalk/35171/4 "2017-07-05T21:54:11Z")

</div>


