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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...