Splunk Search

Extracting name out of http_request

vmishra
Engager

Need help extracting "test" out of - http_request="POST /rest/api/test/*"
Thanks,

0 Karma

richgalloway
SplunkTrust
SplunkTrust

'rex field=http_request "POST\s/rest/api/(?<method>.*?)/"'

---
If this reply helps you, Karma would be appreciated.

richgalloway
SplunkTrust
SplunkTrust

Great! Please accept the answer.

---
If this reply helps you, Karma would be appreciated.
0 Karma

vmishra
Engager

thanks it worked

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

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 ...

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...