Split rabbitmq.connection.name field to visualize

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

10.149.100.111:42708 -> 192.168.112.19:5672

but i need it to be like this:

10.149.100.111:42708
192.168.232.112:5672

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.