Splunk Search

Using event count with a table

thisemailwillbe
Explorer

Hi all,

Here is my current search:

source=health.log REGION=region1 STATE=down TYPE=type1

What I want to do: I want the table to only display results if the region/state/type combination has happened 5 times in the past hour.

I tried using stats count, but I couldn't get it to work and also use table to output the multiple fields.

I must be not understanding something because this seems like it should be fairly easy to do...

Labels (3)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
source=health.log REGION=region1 STATE=down TYPE=type1
| stats count by REGION STATE TYPE
| where count >= 5

or, if you want the events which are included in these stats

source=health.log REGION=region1 STATE=down TYPE=type1
| eventstats count by REGION STATE TYPE
| where count >= 5

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
source=health.log REGION=region1 STATE=down TYPE=type1
| stats count by REGION STATE TYPE
| where count >= 5

or, if you want the events which are included in these stats

source=health.log REGION=region1 STATE=down TYPE=type1
| eventstats count by REGION STATE TYPE
| where count >= 5

thisemailwillbe
Explorer

Thanks! This was a really easy solution, I don't know why I didn't think of doing multiple fields...

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

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