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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...