zbigniewz/elastalert-cookbook

View on GitHub
templates/default/config.yml.erb

Summary

Maintainability
Test Coverage
# This is the folder that contains the rule yaml files
# Any .yaml file will be loaded as a rule
rules_folder: <%= node['elastalert']['rules_directory'] %>

# How often ElastAlert will query Elasticsearch
# The unit can be anything from weeks to seconds
run_every:
  <%= node['elastalert']['elasticsearch']['run_every']['unit'] %>: <%= node['elastalert']['elasticsearch']['run_every']['value'] %>

# ElastAlert will buffer results from the most recent
# period of time, in case some log sources are not in real time
buffer_time:
  <%= node['elastalert']['elasticsearch']['buffer_time']['unit'] %>: <%= node['elastalert']['elasticsearch']['buffer_time']['value'] %>

# The Elasticsearch hostname for metadata writeback
# Note that every rule can have its own Elasticsearch host
es_host: <%= node['elastalert']['elasticsearch']['hostname'] %>

# The Elasticsearch port
es_port: <%= node['elastalert']['elasticsearch']['port'] %>

# Optional URL prefix for Elasticsearch
#es_url_prefix: elasticsearch

# Connect with TLS to Elasticsearch
#use_ssl: True

# Verify TLS certificates
#verify_certs: True

# GET request with body is the default option for Elasticsearch.
# If it fails for some reason, you can pass 'GET', 'POST' or 'source'.
# See http://elasticsearch-py.readthedocs.io/en/master/connection.html?highlight=send_get_body_as#transport
# for details
#es_send_get_body_as: GET

# Option basic-auth username and password for Elasticsearch
#es_username: someusername
#es_password: somepassword

# The index on es_host which is used for metadata storage
# This can be a unmapped index, but it is recommended that you run
# elastalert-create-index to set a mapping
writeback_index: <%= node['elastalert']['elasticsearch']['index'] %>

# If an alert fails for some reason, ElastAlert will retry
# sending the alert until this time period has elapsed
alert_time_limit:
  <%= node['elastalert']['elasticsearch']['alert_time_limit']['unit'] %>: <%= node['elastalert']['elasticsearch']['alert_time_limit']['value'] %>