# Using scripted fields in Kibana?

**URL:** <https://discuss.elastic.co/t/using-scripted-fields-in-kibana/107345>\
**Category:** Kibana\
**Created:** [November 13, 2017, 8:04am UTC](https://discuss.elastic.co/t/using-scripted-fields-in-kibana/107345 "2017-11-13T08:04:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Venky\_Guntakindapall](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venky_guntakindapall/32/23893_2.png) [@Venky\_Guntakindapall](https://discuss.elastic.co/u/Venky_Guntakindapall)\
**Post date:** [November 13, 2017, 8:04am UTC](https://discuss.elastic.co/t/using-scripted-fields-in-kibana/107345/1 "2017-11-13T08:04:50Z")

</div>

Hi,

I have an interesting use case!(of course, it might not be interesting for others 😛) i am sending packet beat flow data to elastic search. While analysing the data in kibana i want few custom tags so i opted for scripted fields. But, the problem is i have source.ip and dest.ip in each indexed document and want to assign a name based on these ips dynamically by getting these ip to host mapping from a centralised place. can i do that in painless or is there any alternative to that?

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [November 13, 2017, 3:23pm UTC](https://discuss.elastic.co/t/using-scripted-fields-in-kibana/107345/2 "2017-11-13T15:23:47Z")

</div>

@Venky_Guntakindapall there's not a way to do that using scripted fields currently, however you can use the [Dns filter plugin](https://www.elastic.co/guide/en/logstash/current/plugins-filters-dns.html) in Logstash to do so. The other benefit that you get from doing this in Logstash when you're indexing the data is that the searches will be much faster.

---

<div class="post-metadata">

**Author:** ![Venky\_Guntakindapall](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venky_guntakindapall/32/23893_2.png) [@Venky\_Guntakindapall](https://discuss.elastic.co/u/Venky_Guntakindapall)\
**Post date:** [November 14, 2017, 8:02am UTC](https://discuss.elastic.co/t/using-scripted-fields-in-kibana/107345/3 "2017-11-14T08:02:22Z")

</div>

okay @Brandon_Kobel i will look into that. Thank you so much 🙂

---

<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:** [December 12, 2017, 8:02am UTC](https://discuss.elastic.co/t/using-scripted-fields-in-kibana/107345/4 "2017-12-12T08:02:27Z")

</div>

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