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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Rounding off the Splunk Dashboard Contest

What does a contest-winning Splunk dashboard look like? In this case, it isn't in a browser tab at all. It ...