Splunk Search

Splunk group by value with pattern matching

msrama5
Explorer

I have saved search below FirstQuery which group by values with pattern matching and want to classify anything not falling under regx pattern for APIFamily in "URI "(?APIFamily[/\w.]+/v\d+)/" " to classify as other category in search query 2, Any ideas how to get the values not matching group by in other category ?

FirstQuery -
search environment=test
index=iis* NOT "GET / - 80" NOT "GET / - 443" NOT "/ping*" NOT "swagger"
|eval URI=lower(cs_uri_stem)
|rex field=URI "(?APIFamily[/\w.]+/v\d+)/"

Search Query 2 on FirstQuery
| savedsearch FirstQuery
| search *
| stats count as total, count(eval(sc_status>304)) as errors, count(eval(sc_status<304)) as pass by APIFamily

Tags (1)
0 Karma

jpolvino
Builder

Can you please repost, and use the tick marks (key above the tab key on US keyboards) around code? This will help readability and prevent the board from stripping content.

0 Karma
Get Updates on the Splunk Community!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...