Splunk Search

Creating a search that will fetch 10 unique repository that perform an action in the last 10 minutes

wailoont
Engager

Hi Splunk,

I am in trying to create an alert that will send email to users if the search query returned results if there is 10 unique repository returned in the events.

search_query earliest=-10m@m latest=now
| stats count by repository| where count > 9 | sort - count

Currently, the alert trigger if there is an occurence of 10 times of the SAME repository. I want to improve the query by triggering alert if only there is 10 DIFFERENT repository.

Tags (1)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You could use stats dc(repository) and trigger when that is 10 or more, or stick to stats count by repository and set the alert trigger to only trigger if the result count is 10 or more.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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