# Docker logs are not coming

**URL:** <https://discuss.elastic.co/t/docker-logs-are-not-coming/214436>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [January 9, 2020, 1:35pm UTC](https://discuss.elastic.co/t/docker-logs-are-not-coming/214436 "2020-01-09T13:35:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rguptarg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rguptarg/32/60643_2.png) [@rguptarg](https://discuss.elastic.co/u/rguptarg)\
**Post date:** [January 9, 2020, 1:35pm UTC](https://discuss.elastic.co/t/docker-logs-are-not-coming/214436/1 "2020-01-09T13:35:18Z")

</div>

Hi Team,

I am trying to configure Docker logs forwarding to ELK through filebeat. I have followed ([https://www.elastic.co/blog/enrich-docker-logs-with-filebeat](https://www.elastic.co/blog/enrich-docker-logs-with-filebeat)).

I can see docker logs on kibana but without log message and no docker related info.

please suggest if any other configuration required.

filebeat yml (filebeat-7.3.2-1.x86\_64) :-  
filebeat.inputs:

- type: log  
enabled: true  
paths:
  - /VMWNODE/docker/containers/_/_.log  
json.message\_key: log  
json.keys\_under\_root: true  
processors:
  - add\_docker\_metadata:  
host: "unix:///var/run/docker.sock"

docker version :-  
Docker version 19.03.1, build 74b1e89

Kibana JSON  
{  
"\_index": "filebeat-7.3.2-2020.01.09-000001",  
"\_type": "\_doc",  
"\_id": "2ad5im8BisIPkQkKIfp5",  
"\_version": 1,  
"\_score": null,  
"\_source": {  
"@timestamp": "2020-01-09T13:23:10.607Z",  
"ecs": {  
"version": "1.0.1"  
},  
"log": {  
"offset": 68782907,  
"file": {  
"path": "/VMWNODE/docker/containers/2e65d4a4f8f6f337877736b21195de83c4663009a876faace614509f66761f9e/2e65d4a4f8f6f337877736b21195de83c4663009a876faace614509f66761f9e-json.log"  
}  
},  
"stream": "stdout",  
"time": "2020-01-08T21:22:58.353467812Z",  
"input": {  
"type": "log"  
},  
"container": {  
"id": "2e65d4a4f8f6f337877736b21195de83c4663009a876faace614509f66761f9e-json.log"  
},  
"host": {  
"hostname": "N1PBBL-EXPA0159",  
"architecture": "x86\_64",  
"name": "N1PBBL-EXPA0159",  
"os": {  
"codename": "Maipo",  
"platform": "rhel",  
"version": "7.6 (Maipo)",  
"family": "redhat",  
"name": "Red Hat Enterprise Linux Server",  
"kernel": "3.10.0-957.21.2.el7.x86\_64"  
},  
"id": "f462e1d352fd42739bea16c0ed67b21e",  
"containerized": false  
},  
"agent": {  
"ephemeral\_id": "67dddafd-cf42-43c8-b727-1ba847c60430",  
"hostname": "N1PBBL-EXPA0159",  
"id": "65528822-8256-4813-9f44-dc4cfbd47a22",  
"version": "7.3.2",  
"type": "filebeat"  
}  
},  
"fields": {  
"@timestamp": [  
"2020-01-09T13:23:10.607Z"  
],  
"suricata.eve.timestamp": [  
"2020-01-09T13:23:10.607Z"  
]  
},  
"sort": [  
1578576190607  
]  
}

---

<div class="post-metadata">

**Author:** ![seaseao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seaseao/32/48107_2.png) [@seaseao](https://discuss.elastic.co/u/seaseao)\
**Post date:** [January 9, 2020, 6:13pm UTC](https://discuss.elastic.co/t/docker-logs-are-not-coming/214436/2 "2020-01-09T18:13:14Z")

</div>

Hi, is it possible that your logs are not being ingested by Elasticsearch/Logstash correctly? What is filebeat's output?

---

<div class="post-metadata">

**Author:** ![rguptarg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rguptarg/32/60643_2.png) [@rguptarg](https://discuss.elastic.co/u/rguptarg)\
**Post date:** [January 10, 2020, 5:16am UTC](https://discuss.elastic.co/t/docker-logs-are-not-coming/214436/3 "2020-01-10T05:16:16Z")

</div>

Hi,  
If i have used simple log path in YML file, i can see docker logs on KIbana  
type: log  
enabled: true  
paths:

- /VMWNODE/docker/containers/ _/_ .log

Also I have tried container input in YMP file, it's working without container Name and other details :-

- type: container  
paths:
  - '/VMWNODE/docker/containers/_/_.log'

processors:

- add\_docker\_metadata:  
host: "unix:///var/run/docker.sock"

- decode\_json\_fields:  
fields: ["message"]  
target: "json"  
overwrite\_keys: true

logging.json: true  
logging.metrics.enabled: false

JSON :-  
{  
"\_index": "filebeat-7.3.2-2020.01.09-000001",  
"\_type": "\_doc",  
"\_id": "O8fZjW8BisIPkQkKjFqk",  
"\_version": 1,  
"\_score": null,  
"\_source": {  
"@timestamp": "2020-01-10T05:07:17.718Z",  
"stream": "stdout",  
"input": {  
"type": "container"  
},  
"ecs": {  
"version": "1.0.1"  
},  
"host": {  
"containerized": false,  
"hostname": "N1PBBL-EXPA0159",  
"name": "N1PBBL-EXPA0159",  
"architecture": "x86\_64",  
"os": {  
"platform": "rhel",  
"version": "7.6 (Maipo)",  
"family": "redhat",  
"name": "Red Hat Enterprise Linux Server",  
"kernel": "3.10.0-957.21.2.el7.x86\_64",  
"codename": "Maipo"  
},  
"id": "f462e1d352fd42739bea16c0ed67b21e"  
},  
"agent": {  
"ephemeral\_id": "3bf716c6-5ab1-4a2b-a184-646439ffa9ea",  
"hostname": "N1PBBL-EXPA0159",  
"id": "65528822-8256-4813-9f44-dc4cfbd47a22",  
"version": "7.3.2",  
"type": "filebeat"  
},  
"message": " [fabsdk/fab] 2020/01/10 05:07:17 UTC - comm.(\*CachingConnector).sweepAndRemove -\> DEBU connection janitor closing connection [[peer1.airtel.com:7051](http://peer1.airtel.com:7051)]",  
"log": {  
"offset": 92473190,  
"file": {  
"path": "/VMWNODE/docker/containers/b506a1f1c7fc8728b1961782de459fd9a4c3b085475caf78d1fdba1c076f49b9/b506a1f1c7fc8728b1961782de459fd9a4c3b085475caf78d1fdba1c076f49b9-json.log"  
}  
}  
},  
"fields": {  
"@timestamp": [  
"2020-01-10T05:07:17.718Z"  
],  
"suricata.eve.timestamp": [  
"2020-01-10T05:07:17.718Z"  
]  
},  
"sort": [  
1578632837718  
]  
}

how can I collect container related info on Kibana (Container Name is important)

---

<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:** [February 7, 2020, 5:16am UTC](https://discuss.elastic.co/t/docker-logs-are-not-coming/214436/4 "2020-02-07T05:16:21Z")

</div>

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