Splunk Search

How to extract the same URL with dynamic values such as Session ID,CategoryID?

raghul1117
New Member

I want to group all the URL with dynamic values such as sessionid , category id ,etc, and display as 1 URL with count.

http://localhost:8001/jpetstore/actions/Catalog.action;jsessionid=B9CAD4D24C3CA435CF7A9E77470504FE?v...

Output should be like below

http://localhost:8001/jpetstore/actions/Catalog.action;jsessionid=**********************************... with count of URL

0 Karma

to4kawa
Ultra Champion
your_search
| rex mode=sed "s/(?i)(?<=id\=)\w+/****/g"

Hi, @raghul1117
How about this?

0 Karma

493669
Super Champion

Try below regex to extract sessionid and categoryId then stats command will calculate statistics of count-

 ...|rex "sessionid=(?<sessionid>\w+)\?.*categoryId=(?<categoryId>\w+)"
|stats count by sessionid categoryId
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...