Splunk Search

Filter subset of search results

ghostrider
Path Finder

I am trying to filter my search results where only a particular subset of the results should be shown. Example suppose if below is the intermediate search result. 

MESSAGE: Records::0

MESSAGE: Records::1

MESSAGE: Records::0

MESSAGE: Records::4

Final search results should contain only where the records are greater than 0. Is there any query which can help with this?

Labels (4)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @ghostrider,

if you already extracted the Records field, it's easy and you can run:

index=your_index Records>0
| ...

if you didn't extracted the field, you have to extract it, something like this:

index=your_index 
| rex "MESSAGE:\s+Records::(?<Records>\d+)"
| where Records>0
| ...

I could be more sure and detailed if you can share some full sample of your logs.

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...