Thx to DalJeanis I have the following search that establishes a baseline of email sent per user by subject then looks for anomalies (i.e., user sends 3.2 emails on average, but is now sending four times the threshold).
Right now, I'm limited to an average dictated by the time picker, but I;d like to have a moving average for the number of emails sent per user to smooth out any peaks/valleys and return more relevant events.
How do I create a search in which the user's average emails sent is for X amount of time (3 months, 6 months, all-time, etc.)?
index=email NOT Status=Quarantined NOT Status=Failed SenderAddress=*.xyz.com
| stats count by SenderAddress Subject
| search count > 1
| eventstats avg(count) as AvgOfCount, stdev(count) as StdevOfCount, max(count) as MaxOfCount by SenderAddress
| eval AvgOfCount = ceiling(AvgOfCount)
| eval StdevOfCount=ceiling(StdevOfCount)
| eval threshold = max(AvgOfCount + 4 * StdevOfCount,10)
| eval KeepMe = if(count >= threshold, 1,0)
| search KeepMe=1
... View more