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!

What’s New & Next in Splunk SOAR

Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us on ...

Your Voice Matters! Help Us Shape the New Splunk Lantern Experience

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...