elastalert icon indicating copy to clipboard operation
elastalert copied to clipboard

Alert if any IP hits more than 300 times. Ideas?

Open spencer-edh opened this issue 8 years ago • 0 comments

I have logs that include a field "IP". I'm wanting to do a rule to see if any IP hits more than 300 times and if it does then send an alert. I can do this if I specify certain IP in the rule.

num_events: 300
timeframe:
    minutes: 1
filter:
- term:
    _type: "serverLogs"
- query:
    query_string:
       query: "IP: 192.168.1.1"

However, I want to check all IPs.

simply put "If any IP hits 300 times send an alert"

This seems like it could be pretty resource intensive because it's checking all fields. Is there any way to use the "use_count_query" option?

Any ideas? Thanks!

spencer-edh avatar Feb 13 '18 15:02 spencer-edh