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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...