how to split URL's like below mentioned into one URL, how to do it in splunk sample URL
https://google.co.in/v4/locations/dfdfd
https://google.co.in/v4/locations/dfad
I would like to see https://google.co.in/v4/locations/ as 2
Hi, have you tried extracting first part of the URL with a regex?
for example, if you have the URL extracted you could try:
<your search> | rex field=URL "(?P<URLpath>https:\/\/.*\/(?!\s))" | stats count by URLpath
This will grab everything exept the last part of the URL and count them as URLpaths.
Hi Mathias Lindblom,
thanks for the update.
Hi, have you tried extracting first part of the URL with a regex?
for example, if you have the URL extracted you could try:
<your search> | rex field=URL "(?P<URLpath>https:\/\/.*\/(?!\s))" | stats count by URLpath
This will grab everything exept the last part of the URL and count them as URLpaths.