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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...