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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Self-Healing Pipeline Is Now Generally Available: AI-Powered CIM Compliance

Maintaining data integrity across security and analytics pipelines is an ongoing challenge. Data ...