Splunk Search

Search Help

DonDandrea
Path Finder

I am stuck on creating a search. I need to sort my results by Agency and I need to list a count of all events as well as a count of all events broken down by the values in the Cause field. The search below accomplishes everything except showing the count of the Cause values.

index=dspro sourcetype=bootlogmaster force=*| stats values(Cause) count by Agency AgencyName

Any help would be greatly appreciated.

Thank you,
Don

Tags (1)
0 Karma
1 Solution

somesoni2
Revered Legend

Try this

index=dspro sourcetype=bootlogmaster force=* | stats count by Agency AgencyName Cause 
| stats list(Cause) as Cause list(count) as count sum(count) as Total by Agency AgencyName

View solution in original post

somesoni2
Revered Legend

Try this

index=dspro sourcetype=bootlogmaster force=* | stats count by Agency AgencyName Cause 
| stats list(Cause) as Cause list(count) as count sum(count) as Total by Agency AgencyName

DonDandrea
Path Finder

That worked perfectly. Thank you very much.

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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