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!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

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

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...