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!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...