Skip to content

Instantly share code, notes, and snippets.

@tecsyscom
Last active May 23, 2017 08:44
Show Gist options
  • Save tecsyscom/616a770778d27ace1dc4dbce6590d730 to your computer and use it in GitHub Desktop.
Save tecsyscom/616a770778d27ace1dc4dbce6590d730 to your computer and use it in GitHub Desktop.
example elastalert rules
name: Example Percentage Match
type: percentage_match
#es_host: localhost
#es_port: 9200
index: logstash-http-request-*
description: "95% of all http requests should be successful"
filter:
- term:
_type: http_request
buffer_time:
minutes: 5
query_key: Hostname.keyword
doc_type: http_request
match_bucket_filter:
- terms:
ResponseStatus: [200]
min_percentage: 95
#max_percentage: 60
#bucket_interval:
# minutes: 1
#sync_bucket_interval: true
#allow_buffer_time_overlap: true
#use_run_every_query_size: true
# (Required)
# The alert is use when a match is found
alert:
- "debug"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment