# Filebeat as Docker

**URL:** <https://discuss.elastic.co/t/filebeat-as-docker/190627>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 16, 2019, 1:55am UTC](https://discuss.elastic.co/t/filebeat-as-docker/190627 "2019-07-16T01:55:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![monica2](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@monica2](https://discuss.elastic.co/u/monica2)\
**Post date:** [July 16, 2019, 1:55am UTC](https://discuss.elastic.co/t/filebeat-as-docker/190627/1 "2019-07-16T01:55:03Z")

</div>

I am using filebeat in a docker. I am getting logs sending to kibana working good. I want to my Docker Host Ip(EC2-instance) address rather than my container ip. I used fileds called beat.name. beat.ip adrress seems my getting docker host(container ID) but not my ec2 ip address. How can i get my ec2 ip address than my docker container IP.  
TIA

---

<div class="post-metadata">

**Author:** ![wu3rstle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wu3rstle/32/49963_2.png) [@wu3rstle](https://discuss.elastic.co/u/wu3rstle)\
**Post date:** [July 16, 2019, 4:37am UTC](https://discuss.elastic.co/t/filebeat-as-docker/190627/2 "2019-07-16T04:37:00Z")

</div>

Using network mode `host` at container start should do the trick.

---

<div class="post-metadata">

**Author:** ![monica2](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@monica2](https://discuss.elastic.co/u/monica2)\
**Post date:** [July 17, 2019, 1:12pm UTC](https://discuss.elastic.co/t/filebeat-as-docker/190627/3 "2019-07-17T13:12:37Z")

</div>

Hi Thnaks for your info. I used as Host mode on Docker compose file. Now i am missing the Container ID info. I am trying to write a script to get IP address of my Host.  
Can i have any advise here please.  
TIA

---

<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:** [August 14, 2019, 1:12pm UTC](https://discuss.elastic.co/t/filebeat-as-docker/190627/4 "2019-08-14T13:12:41Z")

</div>

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