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
Get Updates on the Splunk Community!

Routing Data to Different Splunk Indexes in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. The OpenTelemetry project is the second largest ...

Getting Started with AIOps: Event Correlation Basics and Alert Storm Detection in ...

Getting Started with AIOps:Event Correlation Basics and Alert Storm Detection in Splunk IT Service ...

Register to Attend BSides SPL 2022 - It's all Happening October 18!

Join like-minded individuals for technical sessions on everything Splunk!  This is a community-led and run ...