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!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Enhance Security Operations with Automated Threat Analysis in the Splunk EcosystemAre you leveraging ...

Splunk Developers: Go Beyond the Dashboard with These .Conf25 Sessions

  Whether you’re building custom apps, diving into SPL2, or integrating AI and machine learning into your ...

Index This | How do you write 23 only using the number 2?

July 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...