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.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...