# Is it possible to evaluate a field in runtime?

**URL:** https://discuss.elastic.co/t/is-it-possible-to-evaluate-a-field-in-runtime/41178
**Category:** Beats
**Created:** [February 8, 2016, 12:02pm UTC](https://discuss.elastic.co/t/is-it-possible-to-evaluate-a-field-in-runtime/41178 "2016-02-08T12:02:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Karol\_Stojek](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@Karol\_Stojek](https://discuss.elastic.co/u/Karol_Stojek)
#### Post date: [February 8, 2016, 12:02pm UTC](https://discuss.elastic.co/t/is-it-possible-to-evaluate-a-field-in-runtime/41178/1 "2016-02-08T12:02:58Z")

</div>

Hello,

I'm preparing configuration files for my servers.  
Currently there is a hostname sent by filebeats. But I'd like to add another field - with IP.

I thought the easiest would be to set the env. variable and evaluate it during the startup of filebeat, but I don't think filebeat supports it.  
So is it possible to do it somehow, or I just need to modify the config file on every server by hand and set a proper IP value as a custom field?

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [February 8, 2016, 3:43pm UTC](https://discuss.elastic.co/t/is-it-possible-to-evaluate-a-field-in-runtime/41178/2 "2016-02-08T15:43:09Z")

</div>

We have implemented environment variable replacement in config files but it hasn't been released yet. [https://github.com/elastic/beats/pull/715](https://github.com/elastic/beats/pull/715)

It looks like someone requested the ability to have the Logstash lumberjack input add the client IP address to the event in [https://github.com/logstash-plugins/logstash-input-lumberjack/pull/3](https://github.com/logstash-plugins/logstash-input-lumberjack/pull/3) and even submitted a PR that never merged. logstash-input-lumberjack was the predecessor of logstash-input-beats.

[logstash-input-beats](https://github.com/logstash-plugins/logstash-input-beats) seems like the right place to have this feature since it will have the client IP address. If a server was multi-homed it might be hard from Filebeat to determine what the correct IP address is to add to the event. You could open a ticket for this feature in logstash-input-beats if you like. And a PR probably wouldn't be too hard either since someone already did the work for logstash-input-lumberjack.

---

<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: [July 5, 2017, 9:55pm UTC](https://discuss.elastic.co/t/is-it-possible-to-evaluate-a-field-in-runtime/41178/3 "2017-07-05T21:55:57Z")

</div>


