Splunk Search

How to group values

becksyboy
Contributor

Hi

I have a field name called report_name, it can have a number of status values associated with it, i.e. status=a or status=b or status=c etc.

A complete report run would have (status = a & status = b)
A failed report run would have (status = a & status = b & status = c)
How do I group results where (status = a & status = b) = Good  and (status = a & status = b & status = c) = Failed for a particular report name?
The issue I'm running into is when a report_name has both (status = a & status = b) &  a little while later (status = a & status = b & status = c) I am unable to group them correctly, and end up naming both the same. 
 
thanks
Labels (1)
0 Karma

somesoni2
Revered Legend

What is the frequency of the report? For your report's timerange, does the the report run once OR multiple times? Is there any other field using which  you can uniquely identify a report's execution? If you have a key field OR set of key fields, you'd be able to use `| stats list(status) as statuses ... by key_fields` to get list of status return and then categorize them by that.

0 Karma

becksyboy
Contributor

Thanks for the suggestions, I will investigate to see if there is a unique field.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...