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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...