Kibana url template scripted field

Hello All,

I've created a scripted field and would like know how can i configure the url host and port dynamically through some external config for 1 specific index pattern?
intention is not to come in kibana and do it manually everytime,its should be automated through some external config.
Stuck to understand where to define config and how will it understand to which index pattern it should refer to update .
kibana 7.9.1

if (doc['PartDatas.serviceRequestId.keyword'].size() > 0) {
  def requestId = doc['PartDatas.serviceRequestId.keyword'].value;
  def url = 'http://**abc:8084**/mis-web-ui/#/monitoring/pac-dashboard;requestId=' + requestId;
  return "<a href='" + url + "'>" + requestId + "</a>";
} else {
  return "";
}

Thanx

Hi @PRASHANT_MEHTA,

Try using "URL template" input (instead of defining a script) and it will show a link on Discover.

Example URL template based on your description:

http://**abc:8084**/mis-web-ui/#/monitoring/pac-dashboard;requestId={­{value}­}

Hi @jughosta ,

Thanx for your to look into this.
The url tempalte works for me as static in the solution you recommended.
The challenege is host and port would be updated frequently and to do such changes user will not come to kibana to do it.I'd like to know a way how this can be managed through some configuration file.
Setting up env variable in OS and using it is not an option.

Summarize:
1)Through logstash data parsing i get a field value called "PartDatas.serviceRequestId":"abc"
2)on click of abc route to configured url
3)abc and port will be frequently updated and user won't come to kibana and manually update the host and port for this given index pattern.
4)Now I need to find a way where I can define host and port details and then it should update the url template of particular index pattern with new host or port .

Old implementation:consider you're clicking this and routing to desired url/ url host and port will require frequent update.

Thanx

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

Such custom configuration is not supported.

For updates over time, please consider using Data View API to update field formatters