Splunk Search

Why am I getting this error when using regex for URI search?

ghildiya
Explorer

I have the following query to search results which contain a specific rest endpoint which has a UUID path parameter:

 

 

.... | regex requestURI="/baseurl/\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b

 

 

But it seems to be wrong. Error is :

 

 

Unknown search command '0'.

 

 

What is the mistake I am making here?

Labels (1)
Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust
Splunk appears to be interpreting part of your regular expression as a subsearch. Make sure the expression is enclosed in quotation marks and any embedded quotation marks are escaped.
---
If this reply helps you, Karma would be appreciated.
0 Karma

ghildiya
Explorer

I tried this:

.... | regex requestURI=*/baseurl/\"[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\"*

But this too doesn't work. 

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust
The regex command is still missing the enclosing quotation marks.
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...