# How to get host IP address?

**URL:** <https://discuss.elastic.co/t/how-to-get-host-ip-address/97274>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [August 16, 2017, 2:01pm UTC](https://discuss.elastic.co/t/how-to-get-host-ip-address/97274 "2017-08-16T14:01:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahul01](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@rahul01](https://discuss.elastic.co/u/rahul01)\
**Post date:** [August 16, 2017, 2:01pm UTC](https://discuss.elastic.co/t/how-to-get-host-ip-address/97274/1 "2017-08-16T14:01:48Z")

</div>

Hi,

I am getting the host name when I see logs in kibana. We have many servers who have common name so its hard to identify server from logs so I want IP address also to be sent in logs.  
How should I do that?

Thanks

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [August 17, 2017, 9:47pm UTC](https://discuss.elastic.co/t/how-to-get-host-ip-address/97274/2 "2017-08-17T21:47:42Z")

</div>

In beats you can configure the `name` field with a custom name per instance. As a machine can have multiple IPs, beats do not try to add IPs. In logstash support for adding beats client IPs has been added most recently: [https://github.com/logstash-plugins/logstash-input-beats/issues/180](https://github.com/logstash-plugins/logstash-input-beats/issues/180)

---

<div class="post-metadata">

**Author:** ![rahul01](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@rahul01](https://discuss.elastic.co/u/rahul01)\
**Post date:** [August 18, 2017, 7:06am UTC](https://discuss.elastic.co/t/how-to-get-host-ip-address/97274/3 "2017-08-18T07:06:55Z")

</div>

My scenario is like this  
Metricbeat -\> Kafka -\> Logstash -\> ES -\> Kibana

So logs come from kafka for multiple servers in logstash.

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [August 18, 2017, 12:35pm UTC](https://discuss.elastic.co/t/how-to-get-host-ip-address/97274/4 "2017-08-18T12:35:34Z")

</div>

In this case your best option is to use the [name setting](https://www.elastic.co/guide/en/beats/metricbeat/current/configuration-general.html#_name), in order to configure a custom name.

You can also use the [fields setting](https://www.elastic.co/guide/en/beats/metricbeat/current/configuration-general.html#libbeat-configuration-fields) to add more meta-data one can use for filtering.

---

<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:** [September 15, 2017, 12:35pm UTC](https://discuss.elastic.co/t/how-to-get-host-ip-address/97274/5 "2017-09-15T12:35:36Z")

</div>

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