# Can I add a custom control in a dashboard?

**URL:** <https://discuss.elastic.co/t/can-i-add-a-custom-control-in-a-dashboard/380808>\
**Category:** Kibana\
**Created:** [August 6, 2025, 12:24pm UTC](https://discuss.elastic.co/t/can-i-add-a-custom-control-in-a-dashboard/380808 "2025-08-06T12:24:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Migoz\_ELH](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@Migoz\_ELH](https://discuss.elastic.co/u/Migoz_ELH)\
**Post date:** [August 6, 2025, 12:24pm UTC](https://discuss.elastic.co/t/can-i-add-a-custom-control-in-a-dashboard/380808/1 "2025-08-06T12:24:35Z")

</div>

I want to add a control on a dashboard but the field that I am using has IP of some instances but instead of the IP I want to rewrite each IP with a custom name. Can I do that from dashboard?

---

<div class="post-metadata">

**Author:** ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)\
**Post date:** [August 7, 2025, 4:04am UTC](https://discuss.elastic.co/t/can-i-add-a-custom-control-in-a-dashboard/380808/2 "2025-08-07T04:04:37Z")

</div>

Hello @Migoz_ELH

Welcome to the community!!

As per my understanding could you please check if below is your requirement :

On the index create a runtime field 'host\_type' :

`if (doc['clientip'].value == 'XXX.XXX.XXX.001') {`  
`emit('Web Server');`  
`} else if (doc['clientip'].value == 'XXX.XXX.XXX.002') {`  
`emit('Application Server');`  
`} else if (doc['clientip'].value == 'XXX.XXX.XXX.003') {`  
`emit('Database Server');`  
`} else {`  
`emit('Unknown Server');`  
`}`

This host\_type can be used as a control on the dashboard :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/d/6db149894e988add41848ee8da39ef67e05a68cd.png)

Thanks!!

---

<div class="post-metadata">

**Author:** ![Migoz\_ELH](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@Migoz\_ELH](https://discuss.elastic.co/u/Migoz_ELH)\
**Post date:** [August 7, 2025, 7:03am UTC](https://discuss.elastic.co/t/can-i-add-a-custom-control-in-a-dashboard/380808/3 "2025-08-07T07:03:23Z")

</div>

Hi, @Tortoise

Thank you for the warm welcome and your great answer.  
Yes, you're absolutely right — that's exactly what I was looking for,but I was hoping there was another way from the dashboard itself a way to rename there instead of creating a field. If not this will do again thank you so much.
