Splunk Search

extract URI_Stem and combine based on lowest path

dragon98902072
Explorer

Hey all

I have some IIS extractions that are pulling the field cs_uri_stem from my IIS 7.0-8.0 logs.

I am trying to group stats and totals by common paths at the URI stem level.

EX:

applications/application1/*

applications/application2/*

However the full URI stem will all count differently even using folderize and dedup in my base search.

I would like to ultimately limit this field to say 3 separators or /// that should get me my main application folder and collect all stats under this into the correct application root.

Anyone have any ideas?

Side note, My instance is the cloud version so i do not have access to transforms.

Thanks

Tags (3)
1 Solution

dragon98902072
Explorer

figured out a regex extraction that gives me what i need. see the below that will create 2 new fields root and app that can be used to group stats by either level. The following will take the total size files serverd and group by the second section of the URI (APP)

cs_uri_stem=* sc_bytes>0  | rex field=cs_uri_stem "^/(?<root>.+?)/(?<app>.+?)/" | chart sum(sc_bytes) by app | top limit=25 sum(sc_bytes) by app

View solution in original post

dragon98902072
Explorer

figured out a regex extraction that gives me what i need. see the below that will create 2 new fields root and app that can be used to group stats by either level. The following will take the total size files serverd and group by the second section of the URI (APP)

cs_uri_stem=* sc_bytes>0  | rex field=cs_uri_stem "^/(?<root>.+?)/(?<app>.+?)/" | chart sum(sc_bytes) by app | top limit=25 sum(sc_bytes) by app
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...