Splunk Search

How to extract this field from our sample data using rex?

splunker9999
Path Finder

Hi SPlunkers,

I am newbee with REX. Can someone please assist us in extracting this field?

We need to extract rvasbac07.server.com from our event to a field, below is a sample event:

request_time=254.164934158 response_code=200 match="123 OnMessage (v1.1) - rvasbac07.server.com (split by Agent Host)" match=2241.62 match=rvasbac07.server.com match=2241.62 raw_match_count=4 encoding=UTF-8 response_size=11789

Thanks

0 Karma
1 Solution

sundareshr
Legend

This will get you the field value into a field called server.

... | rex "match=(?<server>\w+\.\w+\.\w+)" | 

View solution in original post

0 Karma

sundareshr
Legend

This will get you the field value into a field called server.

... | rex "match=(?<server>\w+\.\w+\.\w+)" | 
0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...