# Want FIleBeat client IP not hostname

**URL:** <https://discuss.elastic.co/t/want-filebeat-client-ip-not-hostname/93957>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 20, 2017, 2:02pm UTC](https://discuss.elastic.co/t/want-filebeat-client-ip-not-hostname/93957 "2017-07-20T14:02:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![hasan\_sharekhan](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@hasan\_sharekhan](https://discuss.elastic.co/u/hasan_sharekhan)\
**Post date:** [July 20, 2017, 2:02pm UTC](https://discuss.elastic.co/t/want-filebeat-client-ip-not-hostname/93957/1 "2017-07-20T14:02:09Z")

</div>

I am reading logs from FIleBeat \> Logstash \> ElasticSearch

I am only able to capture FileBeat client systems hostname, but I want IP address not hostname. Unable to find working solution in this forum and internet.

Please help

---

<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:** [July 20, 2017, 2:27pm UTC](https://discuss.elastic.co/t/want-filebeat-client-ip-not-hostname/93957/2 "2017-07-20T14:27:32Z")

</div>

Check related issue on logstash-input-beats repo: [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:** ![hasan\_sharekhan](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@hasan\_sharekhan](https://discuss.elastic.co/u/hasan_sharekhan)\
**Post date:** [July 21, 2017, 6:03am UTC](https://discuss.elastic.co/t/want-filebeat-client-ip-not-hostname/93957/3 "2017-07-21T06:03:15Z")

</div>

I am using v5.5, Now i added these lines.

> mutate {  
> add\_field =\> { "remote\_ip" =\> "%{[@metadata][ip\_address]}" }  
> }

but didnt worked, or do i need to modify beats.rb & message\_listener.rb etc

do i need to install some plugins etc

Please provide sample code that would help

---

<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:** [July 21, 2017, 2:03pm UTC](https://discuss.elastic.co/t/want-filebeat-client-ip-not-hostname/93957/4 "2017-07-21T14:03:26Z")

</div>

The change is not included in 5.5.  
Please read this comment for more details: [https://github.com/logstash-plugins/logstash-input-beats/issues/180#issuecomment-315112280](https://github.com/logstash-plugins/logstash-input-beats/issues/180#issuecomment-315112280)

---

<div class="post-metadata">

**Author:** ![hasan\_sharekhan](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@hasan\_sharekhan](https://discuss.elastic.co/u/hasan_sharekhan)\
**Post date:** [July 24, 2017, 10:15am UTC](https://discuss.elastic.co/t/want-filebeat-client-ip-not-hostname/93957/5 "2017-07-24T10:15:45Z")

</div>

Thanks Steffen, I have downloaded and tried to install plugin in many ways but unable to install it.

```
D:\UAT\logstash550\bin>logstash-plugin install --version "4.0.3" logstash-input-beats-master.zip
ERROR: Something went wrong when installing logstash-input-beats-master.zip, message: certificate verify failed

D:\UAT\logstash550\bin>logstash-plugin install --version "4.0.3" logstash-input-beats-master
ERROR: Something went wrong when installing logstash-input-beats-master, message: certificate verify failed

D:\UAT\logstash550\bin>logstash-plugin install --version "4.0.3" file:///d:/uat/logstash550/bin/logstash-input-beats-master.zip
Installing file: /d:/uat/logstash550/bin/logstash-input-beats-master.zip
ERROR: Invalid pack for: file:///d:/uat/logstash550/bin/logstash-input-beats-master.zip, reason: The pack must contains at least one plugin, message: The p
ack must contains at least one plugin

D:\UAT\logstash550\bin>logstash-plugin install --version "4.0.3" file:///d:/uat/logstash550/bin/logstash-input-beats-master
ERROR: Invalid pack for: file:///d:/uat/logstash550/bin/logstash-input-beats-master, reason: Invalid format, the pack must be in zip format, message: Inval
id format, the pack must be in zip format

D:\UAT\logstash550\bin>logstash-plugin install file:///d:/uat/logstash550/bin/logstash-input-beats-master.zip
Installing file: /d:/uat/logstash550/bin/logstash-input-beats-master.zip
ERROR: Invalid pack for: file:///d:/uat/logstash550/bin/logstash-input-beats-master.zip, reason: The pack must contains at least one plugin, message: The p
ack must contains at least one plugin
```

---

<div class="post-metadata">

**Author:** ![Prashant\_Agrawal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_agrawal/32/74982_2.png) [@Prashant\_Agrawal](https://discuss.elastic.co/u/Prashant_Agrawal)\
**Post date:** [July 24, 2017, 10:22am UTC](https://discuss.elastic.co/t/want-filebeat-client-ip-not-hostname/93957/6 "2017-07-24T10:22:41Z")

</div>

Another way is to send the IP address by mentioning it on filebeat conf itself , same can be done as below. By this you need to define the IP to the conf file manually while writing the filebeat yml.

[https://www.elastic.co/guide/en/beats/filebeat/current/configuration-general.html#libbeat-configuration-fields](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-general.html#libbeat-configuration-fields)

---

<div class="post-metadata">

**Author:** ![hasan\_sharekhan](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@hasan\_sharekhan](https://discuss.elastic.co/u/hasan_sharekhan)\
**Post date:** [July 24, 2017, 10:48am UTC](https://discuss.elastic.co/t/want-filebeat-client-ip-not-hostname/93957/7 "2017-07-24T10:48:17Z")

</div>

Thanks Prashant, I will not be able to hard code it in conf file, as we have approx 100+ servers.

---

<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:** [July 24, 2017, 1:28pm UTC](https://discuss.elastic.co/t/want-filebeat-client-ip-not-hostname/93957/8 "2017-07-24T13:28:01Z")

</div>

I have no idea about dealing with conflicts when updating logstash plugins. Please check the logstash forum. I think logstash is using [rubygems](https://rubygems.org/gems/logstash-input-beats) for download via HTTPS (which might be the reason for the certificate error).

---

<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 21, 2017, 1:28pm UTC](https://discuss.elastic.co/t/want-filebeat-client-ip-not-hostname/93957/9 "2017-08-21T13:28:12Z")

</div>

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