Splunk Search

Require Splunk query

khursheed
New Member

Hi

Below data is dynamic, sample input table is given below, rows are order may vary (for simplicity I have put the data in order to understand easily).  

Input:

Feature Name

Browser Name

Result

Feature 1

B1

Pass

Feature 1

B1

Pass

Feature 1

B1

Pass

Feature 1

B1

Pass

Feature 1

B2

Fail

Feature 1

B2

Pass

Feature 1

B2

Pass

Feature 1

B2

Pass

Feature 1

B3

Pass

Feature 1

B3

Pass

Feature 1

B3

Pass

Feature 1

B3

Fail

Feature 1

B4

Pass

Feature 1

B4

Pass

Feature 1

B4

Fail

Feature 1

B4

Pass

 

Based on the above input table, output needs to be generated as listed below.  Cumulative result needs to be generated based on the browser name and result for each feature.  If any one of result fails on particular a browser, feature is considered failed.  

Output:

Feature 1

B1

Pass

Feature 1

B2

Fail

Feature 1

B3

Fail

Feature 1

B4

Fail

 

Would you please help me to generate expected output as listed.

Labels (4)
Tags (3)
0 Karma

somesoni2
SplunkTrust
SplunkTrust

Try something like this

Your Base search fetching fields "Feature Name","Browser Name",Result
| stats count(eval(Result="Fail")) as Result by "Feature Name","Browser Name"
| eval Result=if(Result>0,"Fail","Pass")
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| stats values(Result) as Result by 'Browser Name' 'Feature Name'
| eval Result=mvindex(Result,0)
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

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