Splunk Search

Only display rows in table if it contains value

606866581
Path Finder

Hi Splunkers, I've been struggling to find what should be an easy solution...

I have a table with many columns, one of the headers is: server_load.

I only want to display a row, if server_load > 80.

Any advice is much appreciated, Thanks

Tags (4)
0 Karma
1 Solution

aholzer
Motivator

Pipe your base search into a where or search command with server_load > 80.

<base search> | where server_load > 80 | table <your fields>

You don't even need the where clause if your server_load is an original field from the events. In which case you can simply add "server_load > 80" as part of your base search.

<base search> server_load > 80 | table <your fields>

View solution in original post

linu1988
Champion

Isn't it easy to just apply where condition server_load>80 in your search query? Am i not getting something!! Kindly explain.

0 Karma

aholzer
Motivator

Pipe your base search into a where or search command with server_load > 80.

<base search> | where server_load > 80 | table <your fields>

You don't even need the where clause if your server_load is an original field from the events. In which case you can simply add "server_load > 80" as part of your base search.

<base search> server_load > 80 | table <your fields>

606866581
Path Finder

Brilliant, I'll note this one down for future use.
Thanks a bunch!

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,  ...