Splunk Search

How to filter out specific rows in a table based on column values?

parizanov
New Member

Hello,

I have a table like the one below, with a column containing repeated id numbers form one side and respective messages for each id on the other side. I want to make a search which can show the id numbers that have only "Error" message as value and skip repeating ids that have Error and OK. Any help is much appreciated.

col1       col2
11111      Error
11111      OK
55555      Error

In the example, successful query should return 55555.

Tags (4)
0 Karma
1 Solution

sundareshr
Legend

Try this

base search | chart count over col1 by col2 | where col2=0

*OR*

base search | eventstats values(col2) as status by col1 | where isnull(mvfind(status, "OK"))

View solution in original post

0 Karma

sundareshr
Legend

Try this

base search | chart count over col1 by col2 | where col2=0

*OR*

base search | eventstats values(col2) as status by col1 | where isnull(mvfind(status, "OK"))
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 ...