Yelp / elastalert

Easy & Flexible Alerting With ElasticSearch
https://elastalert.readthedocs.org
Apache License 2.0
7.99k stars 1.74k forks source link

Need help with writing frequency rule #3204

Open DenitThomas opened 3 years ago

DenitThomas commented 3 years ago

Hi, Could someone please look at this rule file and let me know what am missing? When I try to test the rule using elastalert-test-rule, it says "Didn't get any results"

Frequency Rule File -

es_host: 10.10.10.41
es_port: 19200
name: 424 Rule
type: frequency
index: syslog-ng*
use_strftime_index: true
num_events: 5
timestamp_field: ISODATE
timeframe:
  hours: 4
filter:
- query:
    query_string:
      query: "MESSAGE: *Completed 424 FAILED_DEPENDENCY
![Screenshot 2021-08-03 at 6 47 13 PM](https://user-images.githubusercontent.com/82877267/128022049-7c554198-6b59-4936-be80-32b3cf5b4f65.png)
"
alert:
- "email"
email:
- "abc@abc.com"

In ELK, I do see lot of 424 FAILED_DEPENDENCY errors within the last 4 hours.

DenitThomas commented 3 years ago

Screenshot 2021-08-03 at 6 47 13 PM