Splunk Search

extract string from _raw data

owie6466
Explorer

Hello need help to extract the number from this result:

Total number of files under /wmq/logs/AMXDEVRC120/active is: 184

i'm trying to get the total number of files from this directory and compare if over 500. 

 

thank you, 

 

Labels (1)

owie6466
Explorer

thanks for the help

 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Use rex.

... | rex "is: (?<numFiles>\d+)"
| stats sum(numFiles) as TotalFiles
| where TotalFiles > 500
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...