rolo
(rolo)
October 14, 2019, 11:22pm
1
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
lukas
(Lukas Olson)
October 17, 2019, 8:18pm
2
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 .
system
(system)
Closed
November 14, 2019, 8:18pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.