# How to get beat.name(filebeat) as Docker HostIP

**URL:** <https://discuss.elastic.co/t/how-to-get-beat-name-filebeat-as-docker-hostip/191549>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 22, 2019, 12:07am UTC](https://discuss.elastic.co/t/how-to-get-beat-name-filebeat-as-docker-hostip/191549 "2019-07-22T00:07:02Z")\
**Posts on this page:** 3\
**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 22, 2019, 12:07am UTC](https://discuss.elastic.co/t/how-to-get-beat-name-filebeat-as-docker-hostip/191549/1 "2019-07-22T00:07:02Z")

</div>

Hi All

I am using filebeat Docker. we have AWS Infrastructure this filebeat container is running on our 20 ec2 machines. The problem is when something goes wron on any machines it's being hard to debug which machine went wrong. Since beat.name is Docker container Hostname not the EC2-machine IP adddress. I tried to use my container in network mode as Host. But seems not very useful. I tried with Enviroinment variables but seems not working . Is there a better i can get beat.name as my ec2 machine IP instead of Docker Container Hostname. I appreciate your help. I really need this solution. TIA

---

<div class="post-metadata">

**Author:** ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)\
**Post date:** [July 25, 2019, 6:37pm UTC](https://discuss.elastic.co/t/how-to-get-beat-name-filebeat-as-docker-hostip/191549/2 "2019-07-25T18:37:27Z")

</div>

You could add a custom fields in your configuration to help identify them?

```auto
fields:
  myfield: "abc?"

```

or with an environment variables

```auto
field:
  myfield: ${NAME:beats}
```

---

<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 22, 2019, 6:50pm UTC](https://discuss.elastic.co/t/how-to-get-beat-name-filebeat-as-docker-hostip/191549/3 "2019-08-22T18:50:00Z")

</div>

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