-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathexample_cardinality.yaml
executable file
·60 lines (47 loc) · 1.42 KB
/
example_cardinality.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Alert when the rate of events exceeds a threshold
# (Optional)
# Elasticsearch host
# es_host: elasticsearch.example.com
# (Optional)
# Elasticsearch port
# es_port: 14900
# (Required)
# Index to search, wildcard supported
index: logstash-*
# (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 cardinality rule
# (Required)
# Type of alert.
# the frequency rule type alerts when num_events events occur with timeframe time
type: cardinality
# (Required, cardinality specific)
# Count the number of unique values for this field
cardinality_field: "Hostname"
# (Required, frequency specific)
# Alert when there less than 15 unique hostnames
min_cardinality: 15
# (Required, frequency specific)
# The cardinality is defined as the number of unique values for the most recent 4 hours
timeframe:
hours: 4
# (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:
status: "active"
# (Required)
# The alert is use when a match is found
alert:
- "email"
# (required, email specific)
# a list of email addresses to send alerts to
email:
- "elastalert@example.com"