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?

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...