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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...