Grouping values in graphic

hi,

I am trying to create a new visualize by counting values by url in Kibana.

Example:
facebok.com/api/home/id_ramdoms/home_page
facebok.com/api/home/id_randoms

I would like to create a script to create a new field.

Like url_resource and just see /home_page and /home.

How can I divide the url?

Thank you very much in advance

Maybe something like this would work:

def url = doc['url'].value;
return url.substring(url.lastIndexOf('/') + 1);

See https://www.elastic.co/blog/using-painless-kibana-scripted-fields.

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