Split rabbitmq.connection.name field to visualize

I want to create a Sankey visualization in Kiban using rabbitmq.connection.name from metricbeat .
I get the data like this: ->

but i need it to be like this:

How can i use regex for it ?

You can create two scripted fields in your index pattern in Kibana. For example:

String target = doc['rabbitmq.connection.name'].value;
int index = target.indexOf(' ', 0);
if (index === -1) {
  return target.substring(0, target.length());
return target.substring(0, index);```

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