Splunk Search

The "where count" clause is showing no results

anayi
Observer

I'm trying to create an alert. The alert's query ends with " | stats values(*) as * by actor.displayName | stats count(actor.displayName)".

anayi_0-1727969909088.png

I want to add the clause, " | where count > 5" at the end of the query. To verify that the query would work, I changed it "| where count < 5", but I'm getting no results.

anayi_1-1727970089613.png

 

Labels (2)
Tags (3)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| stats count(actor.displayName)

will give you a field called "count(actor.displayName)" not "count" which is why the where command returns no results. Try it like this

| stats count(actor.displayName) as count | where count < 5
0 Karma

anayi
Observer

I removed "(actor.displayName)" from the first "count" command and it works now.

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In January, the Splunk Threat Research Team had one release of new security content via the Splunk ES Content ...

Expert Tips from Splunk Professional Services, Ensuring Compliance, and More New ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Observability Release Update: AI Assistant, AppD + Observability Cloud Integrations & ...

This month’s releases across the Splunk Observability portfolio deliver earlier detection and faster ...