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 Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

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