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?
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 :
Thanks!!
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.