Created
April 12, 2018 14:01
-
-
Save odrianoaliveira/5eb2387811a28c24b88b59cd1323d754 to your computer and use it in GitHub Desktop.
kibana scripted field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!doc['request.keyword'].empty) { | |
def m = /\/api\/(.*[-\/]v[0-9])\/.*/.matcher(doc['request.keyword'].value); | |
if (m.matches()) { | |
return m.group(1) | |
} | |
} | |
return "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment