# Getting Ip-Adress from Filebeat-Client

**URL:** https://discuss.elastic.co/t/getting-ip-adress-from-filebeat-client/93757
**Category:** Logstash
**Created:** [July 19, 2017, 12:35pm UTC](https://discuss.elastic.co/t/getting-ip-adress-from-filebeat-client/93757 "2017-07-19T12:35:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Truesight](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@Truesight](https://discuss.elastic.co/u/Truesight)
#### Post date: [July 19, 2017, 12:35pm UTC](https://discuss.elastic.co/t/getting-ip-adress-from-filebeat-client/93757/1 "2017-07-19T12:35:54Z")

</div>

Hello, i have my Logstash on one Server and Filebeat on many other mashines with varying IP-Adresses.  
I have tried the dns plugin allready, but since the hostname is not convertable to ip it doesn't work. Is there any other way to maybe attach the ip adress to the logs send to logstash from Filebeat? Or maybe simply displaying host as ip from the source?  
Thank you

---

<div class="post-metadata">

### Author: ![Truesight](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@Truesight](https://discuss.elastic.co/u/Truesight)
#### Post date: [July 21, 2017, 11:33am UTC](https://discuss.elastic.co/t/getting-ip-adress-from-filebeat-client/93757/2 "2017-07-21T11:33:13Z")

</div>

Hey, in case someone comes across the same problem, i have figured out a solution to this problem and just wanted to share. One can simply adjust the filebeat.yml under "General" and have the name be the IP-Address. In my case i simply created an "InsertIP.bat" :

```
  @echo off
  (ipconfig | findstr IPv4)>>x.txt
  echo %variable%
  fart.exe -w x.txt "IPv4-Adresse . . . . . . . . . . :" " "
  set /p variable=<x.txt
  copy template.yml filebeat.yml
  fart.exe -w filebeat.yml CHANGEIPADDRESS "%variable%"
  del x.txt

```

fart is btw. "FindAndReplaceText" .. pretty usefull  
In logstash i can now access that IP-Addreess via %{[beat][name]}.  
I hope it is helpfull to some. 🙂

---

<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 18, 2017, 11:33am UTC](https://discuss.elastic.co/t/getting-ip-adress-from-filebeat-client/93757/3 "2017-08-18T11:33:33Z")

</div>

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