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!

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

New Release | Splunk Cloud Platform 10.1.2507

Hello Splunk Community!We are thrilled to announce the General Availability of Splunk Cloud Platform 10.1.2507 ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

&#x1f5e3; You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...