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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...