Kibana: I want to extract a string from a URL


I'm working with kibana, I made a bar graph, but on the x-axis the records are url's

What I did for this was add the following script:

        "script": "( _value.indexOf('/') > 0 ? _value.substring(_value.lastIndexOf('/')) : _value )"

and it already extracts the string, but now my problem is that there are urls that end with diagonal (/) and this is where I got stuck, because when executing the escrip it shows me the registers (that end in diagonal) :

asked by SeliGVyo 20.12.2018 в 05:55

0 answers