elastalert
elastalert copied to clipboard
Alert if any IP hits more than 300 times. Ideas?
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!