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!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...