Splunk Search

Regex pattern

bbhandari012
Explorer

How do i use the regex pattern to get only 13348864 for memory-free ?

forwarder.memory.memory-cached 367001600 1458101573
forwarder.memory.memory-free 13348864 1458101573
forwarder.memory.memory-slab_recl 29585408 1458101573
forwarder.memory.memory-used 66830336 1458101573

Tags (1)
0 Karma

chimell
Motivator

Hi
Try this search code

    ..............| rex  field=_raw "forwarder\.memory\.memory-free\s+(?<memory_free>[\d+]+)\s+"
0 Karma

dwaddle
SplunkTrust
SplunkTrust

A simple approach might be something like:

| rex "forwarder\.memory\.memory-free\s+(?<memory-free>\d+)\s+"

But surely you tried this or something very close to it?

Get Updates on the Splunk Community!

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...