Splunk Search

How to only list the columns containing a fail value

rajkumarwipro
New Member

I want to display the events having a FAIL value in any of the columns.

For Eg :
alt text

Please help me on this!

Labels (1)
0 Karma
1 Solution

to4kawa
Ultra Champion
| makeresults count=6
| streamstats count
| eval Name="System ".count
| fillnull Status_A Status_B Status_C Status_D Status_E
| foreach Status*[eval <<FIELD>> = mvindex(split("PASS,FAIL",","),random() % 2)]
| table Name Status*
| rename COMMENT as "sample data"

| untable Name Status status
| stats values(eval(if(status="PASS",Status,NULL))) as PASS values(eval(if(status="FAIL",Status,NULL))) as FAIL by Name
| nomv PASS
| nomv FAIL

try after COMMENT

View solution in original post

0 Karma

to4kawa
Ultra Champion
| makeresults count=6
| streamstats count
| eval Name="System ".count
| fillnull Status_A Status_B Status_C Status_D Status_E
| foreach Status*[eval <<FIELD>> = mvindex(split("PASS,FAIL",","),random() % 2)]
| table Name Status*
| rename COMMENT as "sample data"

| untable Name Status status
| stats values(eval(if(status="PASS",Status,NULL))) as PASS values(eval(if(status="FAIL",Status,NULL))) as FAIL by Name
| nomv PASS
| nomv FAIL

try after COMMENT

0 Karma

rajkumarwipro
New Member

Thank you.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

What is your current search?

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

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

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...