Splunk Search

Rex field to extract dot net module

totaro
Explorer

Hi i currently have the following line in my search that search for system.net.webclient:

|rex max_match=0 "(?<module>(system.net.webclient))"

May i know how do i amend this to search for any syntax that match system.xxx.xxx so it work for all the module?

Tags (2)
0 Karma
1 Solution

vnravikumar
Champion

Hi

check this

| makeresults 
| eval test= "system.com.testclient" 
| rex field=test max_match=0 "(?<module>(system\.\w+\.\w+))"

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try |rex max_match=0 "(?<module>system\.[^\.]+\.\S+)".

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

totaro
Explorer

This actually works better if the data was more organize; sadly my data was not and it capture too many noise

0 Karma

vnravikumar
Champion

Hi

check this

| makeresults 
| eval test= "system.com.testclient" 
| rex field=test max_match=0 "(?<module>(system\.\w+\.\w+))"
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...