Splunk Search

How to generate a search to find the number of created accounts?

wvalente
Explorer

Hi,

I'm trying to run a search that alerts me when 40 accounts is created within 1 minute. I'm talking about linux users.

I've tried this search:

index=XXX process=useradd | stats count by user earliest:-1m@m | where count > 40

But I don't know it's correct.

Help!

Tks.

0 Karma

sbbadri
Motivator

try this

index=xxx process=useradd earliest=-1m@m | stats count by user | where count>=40

0 Karma

somesoni2
Revered Legend

Try like this (the timerange identifier earliest should be in base search)

 index=XXX process=useradd  earliest=-1m@m latest=@m | stats dc(user) as user_created | where user_created > 40
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...