Aamir Sheraz
Aamir Sheraz

Reputation: 55

ElastAlert frequency rule not getting any hit/find

I am unable to get any hit for frequency rule. I got boilerplate code from elastalert and updated host, port, index and query. Next I posted some data in elasticsearch for that I want to send email after it is looked up by elastalert. But elastalert is not finding this data. Below are rule file and elasticsearch data.

# Elasticsearch host
es_host: localhost

# (Optional)
# Elasticsearch port
es_port: 9200

# (OptionaL) Connect with SSL to Elasticsearch
#use_ssl: True

# (Optional) basic-auth username and password for Elasticsearch
#es_username: someusername
#es_password: somepassword

# (Required)
# Rule name, must be unique
name: Example frequency rule

# (Required)
# Type of alert.
# the frequency rule type alerts when num_events events occur with timeframe time
type: frequency

# (Required)
# Index to search, wildcard supported
index: test

# (Required, frequency specific)
# Alert when this many documents matching the query occur within a timeframe
num_events: 1

# (Required, frequency specific)
# num_events must occur within this amount of time to trigger an alert
timeframe:
  hours: 1

# (Required)
# A list of Elasticsearch filters used for find events
# These filters are joined with AND and nested in a filtered query
# For more info: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html
filter:
- term:
    name: "aamir"~~

[![Kibana showing required data][2]][2]


  [1]: https://i.sstatic.net/dRi2Z.png
  [2]: https://i.sstatic.net/uTjUT.png

Upvotes: 1

Views: 443

Answers (0)

Related Questions