# How to configure Filebeat -\> ELK Docker Container correctly?

**URL:** <https://discuss.elastic.co/t/how-to-configure-filebeat-elk-docker-container-correctly/63769>\
**Category:** Beats\
**Created:** [October 24, 2016, 3:07pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-elk-docker-container-correctly/63769 "2016-10-24T15:07:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoram](https://avatars.discourse-cdn.com/v4/letter/z/ebca7d/32.png) [@zoram](https://discuss.elastic.co/u/zoram)\
**Post date:** [October 24, 2016, 3:07pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-elk-docker-container-correctly/63769/1 "2016-10-24T15:07:51Z")

</div>

Dear All,

I have already installed on my local computer ELK Docker Container and Filebeat.

I could read my local glassfish log directly from Kibana dashboard. But I want that the log file should be forwarding to ELK Container "Logstash" first.

under my ELK Container I found this conf.d folder with the following files

```
root@4569cf1f66ab:/etc/logstash/conf.d# ls
01-lumberjack-input.conf 02-beats-input.conf 10-syslog.conf 11-nginx.conf 30-output.conf 

```

My current configuration look like here.

filebeat.yml file

```auto
################### Filebeat Configuration Example #########################

############################# Filebeat ######################################
filebeat:
  # List of prospectors to fetch data.
  prospectors:
        - /Users/mmlug/Documents/university/project/runtime/glassfish-3.1/glassfish/domains/domain1/logs/server.log
        #- c:\programdata\elasticsearch\logs\*
      input_type: log
      exclude_lines: ["^DBG"]
	  
output:
  ### Elasticsearch as output
  elasticsearch:
	hosts: ["localhost:9200"]

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

```

```
Step 1 Starting Docker : sudo docker-compose up elk
Step 2 : sudo ./filebeat -e -c filebeat.yml -d "publish"

```

When I enable "Logstash" as a output, I always got an errors as below...

```
Loading config file error: YAML config parsing failed on filebeat.yml: yaml: line 279: found character that cannot start any token. Exiting.

```

Many thanks in advance.

Best Regards,  
Thomas.

---

<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:** [October 25, 2016, 7:34am UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-elk-docker-container-correctly/63769/2 "2016-10-25T07:34:44Z")

</div>

Could it be that your `filebeat.yml` is much longer then what you posted above? There seems to be a problem on lin 279. Most of the time the issue with yaml is using tabs instead of spaces.

---

<div class="post-metadata">

**Author:** ![zoram](https://avatars.discourse-cdn.com/v4/letter/z/ebca7d/32.png) [@zoram](https://discuss.elastic.co/u/zoram)\
**Post date:** [October 25, 2016, 2:25pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-elk-docker-container-correctly/63769/3 "2016-10-25T14:25:21Z")

</div>

hi ruflin,

Thanks.! Yes, I could fixed the error.  
After editing "02-beats-input.conf" under ":/etc/logstash/conf.d" I could now see the glassfish logs in kibana.

Do you know how I can proper display glassfish multiple line logs in Kibana?

Best Regards,  
Thomas

---

<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:** [October 25, 2016, 3:15pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-elk-docker-container-correctly/63769/4 "2016-10-25T15:15:57Z")

</div>

That is probably what you are looking for: [https://www.elastic.co/guide/en/beats/filebeat/5.0/multiline-examples.html#multiline-examples](https://www.elastic.co/guide/en/beats/filebeat/5.0/multiline-examples.html#multiline-examples)

---

<div class="post-metadata">

**Author:** ![zoram](https://avatars.discourse-cdn.com/v4/letter/z/ebca7d/32.png) [@zoram](https://discuss.elastic.co/u/zoram)\
**Post date:** [November 1, 2016, 3:32pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-elk-docker-container-correctly/63769/5 "2016-11-01T15:32:39Z")

</div>

thanks @ruflin

---

<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:** [November 14, 2016, 3:07pm UTC](https://discuss.elastic.co/t/how-to-configure-filebeat-elk-docker-container-correctly/63769/6 "2016-11-14T15:07:56Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
