Splunk Search

How to display the last uri_path in each transaction event?

ashnet16
Path Finder

Currently I'm using: sourcetype=access_*|transaction clientip maxpause=1h keepevicted=t mvlist=t | table uri_path . This search displays all uri_paths occurring in a given transaction. I would like to display the last uri_path of each event. The results of my current search is below.

/category.screen
/product.screen
/oldlink
/cart.do
/cart.do
/category.screen
/cart.do
/cart/success.do
/category.screen
/oldlink

/cart.do

/product.screen
/cart.do
/product.screen
/category.screen
/cart.do
/product.screen
/cart.do
/product.screen
/cart.do
/cart/success.do
/cart.do

1 Solution

martin_mueller
SplunkTrust
SplunkTrust

You can grab the last value of a multivalue field like this:

... | eval last_uri_path = mvindex(uri_path, -1)

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

You can grab the last value of a multivalue field like this:

... | eval last_uri_path = mvindex(uri_path, -1)

ashnet16
Path Finder

THANK YOU! This works out perfectly!

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...