Alerting

How to set an alert when the distinct count is less than 10 over the last hour?

ashabc
Contributor

I have a search like below:

... | stats dc(cs_username) as unique_user

I want to run an hourly job and raise an alert when the unique_user number falls below 10 over last hour. How can I achieve this?

0 Karma

ashabc
Contributor

Thank you Pablo for pointing me to the right direction.

I ended up using below

.... | stats dc(cs_username) as unique_user | where unique_user < 10

and set an alert if the return result is greater > 0

Also used the cron job to run at 15th minute of every hour between 9 am to 6 pm during weekdays as per below . Hopefully should work.

15 09-18 * * 1-5

somesoni2
Revered Legend

This will give you all the steps that you need to follow:-

http://docs.splunk.com/Documentation/Splunk/6.0.3/Alert/Definescheduledalerts

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Run your search then click "Save As" and select "Alert". Fill in the form and click Save.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...