Alerting

What is the best way to trigger an alert when more than one user gets locked out on one machine?

cyber2016
New Member

What is the best way to trigger an alert based on multiple failed attempts from one machine?
For example: I want an alert when on one machine, more than one user gets locked out.

I tried | stats count by host, user, but it gives me all locked attempts.

0 Karma
1 Solution

javiergn
Super Champion

If you want distinct users then use dc:

your base search
| stats dc(user) as distinct_users, values(user) as users by host
| where distinct_users > 1

View solution in original post

0 Karma

javiergn
Super Champion

If you want distinct users then use dc:

your base search
| stats dc(user) as distinct_users, values(user) as users by host
| where distinct_users > 1
0 Karma

cyber2016
New Member

something is wrong with this query. I am getting error: in 'stats' command: the output field 'distinct_users' cannot have the same name as a group-by field

0 Karma

javiergn
Super Champion

Are you also trying to group by users?
Can you post your full query here?

0 Karma

cyber2016
New Member

it is fine, I found the problem, thanks for help

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...