# Filebeat not pushing to elastic - docker compose

**URL:** https://discuss.elastic.co/t/filebeat-not-pushing-to-elastic-docker-compose/205427
**Category:** Beats
**Tags:** docker, filebeat
**Created:** [October 28, 2019, 9:02am UTC](https://discuss.elastic.co/t/filebeat-not-pushing-to-elastic-docker-compose/205427 "2019-10-28T09:02:02Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Neal\_Derman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neal_derman/32/56598_2.png) [@Neal\_Derman](https://discuss.elastic.co/u/Neal_Derman)
#### Post date: [October 28, 2019, 9:02am UTC](https://discuss.elastic.co/t/filebeat-not-pushing-to-elastic-docker-compose/205427/1 "2019-10-28T09:02:02Z")

</div>

I'm trying to get filebeat data to elastic. I've followed the instructions and I have filebeat running in a container. I'd ultimately like it to grab stdout from my other containers and push that to [elastic.co](http://elastic.co) but first off i just want to see something working.

Right now the container is running and showing stack monitoring from filebeat in the terminal but I am not seeing anything on kibana.

docker-compose.yml

```
  filebeat:
image: docker.elastic.co/beats/filebeat:7.4.1
command:
  - "-e"
  - "--strict.perms=false"
networks:
  - kong-net
volumes:
  - "./services/filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro"
# needed to persist filebeat tracking data :
  - "filebeat_data:/usr/share/filebeat/data:rw"
# needed to access all docker logs (read only) :
  - "/var/lib/docker/devicemapper/devicemapper/data:/usr/share/dockerlogs/data:ro"
# needed to access additional informations about containers
  - "/var/run/docker.sock:/var/run/docker.sock"

```

filebeat.yml

```
filebeat.inputs: 
  - type: docker 
    combine_partial: true 
    containers: 
      path: "/usr/share/dockerlogs/data" 
      stream: "stdout" 
      ids: 
        - "*" 
    exclude_files: ['\.gz$'] 
    ignore_older: 10m
processors: #decode the log field (sub JSON document) if JSON encoded, then maps it's fields to elasticsearch fields 
  - decode_json_fields:
    fields: ["log", "message"] 
    target: ""
    #overwrite existing target elasticsearch fields while decoding json fields 
    overwrite_keys: true
  - add_docker_metadata:
      host: "unix:///var/run/docker.sock"
# setup filebeat to send output to logstash output.logstash: hosts: ["logstash"]
cloud.id: "my_testt:secret_key"
cloud.auth: "elastic:secret"

processors:
# decode the log field (sub JSON document) if JSONencoded, then maps it's fields to elasticsearch fields
- decode_json_fields:
    fields: ["log"]
    target: ""
# overwrite existing target elasticsearch fields while decoding json fields
    overwrite_keys: true
- add_docker_metadata: ~
```

---

<div class="post-metadata">

### Author: ![Neal\_Derman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neal_derman/32/56598_2.png) [@Neal\_Derman](https://discuss.elastic.co/u/Neal_Derman)
#### Post date: [October 28, 2019, 1:04pm UTC](https://discuss.elastic.co/t/filebeat-not-pushing-to-elastic-docker-compose/205427/2 "2019-10-28T13:04:13Z")

</div>

I've done some tweaking and I put filebeat in debug mode.

I am now generating logs and pushing them to Kibana. I'm just not sure how to enable the logstash module on the filebeat logs when using docker compose.

---

<div class="post-metadata">

### Author: ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)
#### Post date: [October 28, 2019, 6:00pm UTC](https://discuss.elastic.co/t/filebeat-not-pushing-to-elastic-docker-compose/205427/3 "2019-10-28T18:00:33Z")

</div>

Could you please share the debug logs?

---

<div class="post-metadata">

### Author: ![Neal\_Derman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neal_derman/32/56598_2.png) [@Neal\_Derman](https://discuss.elastic.co/u/Neal_Derman)
#### Post date: [October 29, 2019, 9:11am UTC](https://discuss.elastic.co/t/filebeat-not-pushing-to-elastic-docker-compose/205427/4 "2019-10-29T09:11:33Z")

</div>

I am seeing my logs pushing through to elastic. I just need to figure out how to get them to come through using the logstash module when using docker and docker-compose

---

<div class="post-metadata">

### Author: ![Neal\_Derman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neal_derman/32/56598_2.png) [@Neal\_Derman](https://discuss.elastic.co/u/Neal_Derman)
#### Post date: [October 29, 2019, 12:25pm UTC](https://discuss.elastic.co/t/filebeat-not-pushing-to-elastic-docker-compose/205427/5 "2019-10-29T12:25:31Z")

</div>

Also, it is working when i run the docker-compose on my local machine but when i try run the same thing in rancher i don't see any logs coming through to kibana

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [October 29, 2019, 1:06pm UTC](https://discuss.elastic.co/t/filebeat-not-pushing-to-elastic-docker-compose/205427/6 "2019-10-29T13:06:20Z")

</div>

Perhaps Your output section looks odd, you are trying to use cloud auth syntax instead of normal logstash output

[https://www.elastic.co/guide/en/beats/filebeat/current/logstash-output.html](https://www.elastic.co/guide/en/beats/filebeat/current/logstash-output.html)

---

<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 26, 2019, 1:06pm UTC](https://discuss.elastic.co/t/filebeat-not-pushing-to-elastic-docker-compose/205427/7 "2019-11-26T13:06:34Z")

</div>

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