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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...