cookbook 'pip_elastalert', '~> 1.1.0'
pip_elastalert (3) Versions 1.1.0 Follow0
Installs/Configures elastalert
cookbook 'pip_elastalert', '~> 1.1.0', :supermarket
knife supermarket install pip_elastalert
knife supermarket download pip_elastalert
Elastalert cookbook
Overview
This chef cookbook is a fork of zbigniewz's elastalert-cookbook with
chandru9279's Pull Request.
It installs and configures Yelp's elastalert from PyPI.
In more details:
- checks out elastalert github repo using given commit hash or tag
- create elastalert user and group
- installs elastalert in python virtual environment
- creates elastalert index in Elasticsearch
- starts elastalert service with supervisor
- manages elastalert rules
Requirements
Platforms
- Debian 8
Cookbooks
- poise-python
- supervisor
Other
- access to Elasticsearch cluster in version needed by particular version of elastalert (default 2.*)
How to use
Create wrapper around this cookbook and adjust attributes to your needs.
Attributes
-
node['pip-elastalert']['version']
- elastalert version to install from pip, defaultnil
meaning it will take the latest -
node['pip-elastalert']['elasticsearch']['hostname']
- hostname of elasticsearch to use, defaultlocalhost
-
node['pip-elastalert']['elasticsearch']['port']
- port of elasticsearch to use, default9200
-
node['pip-elastalert']['elasticsearch']['index']
- name of index to be created by elastalert, defaultelastalert_status
-
node['pip-elastalert']['elasticsearch']['index_old']
- old / previous elastalert index, default empty -
node['pip-elastalert']['elasticsearch']['url_prefix']
- prefix for Elasticsearch URl (see Elastalert docs), default empty -
node['pip-elastalert']['elasticsearch']['create_index_opts']
- additional options for creating elastalert index (see Elastalert docs), default--no-auth --no-ssl
-
node['pip-elastalert']['group']
- name of group for user running elastalert, defaultelastalert
-
node['pip-elastalert']['user']
- name of user running elastalert, defaultelastalert
-
node['pip-elastalert']['user_home']
- home directory for user running elastalert, default/home/elastalert
-
node['pip-elastalert']['directory']
- installation directory of elastalert, default/opt/elastalert
-
node['pip-elastalert']['rules_directory']
- directory containing elastalert rules, default/opt/elastalert/rules
-
node['pip-elastalert']['virtualenv']['directory']
- directory for python virtual environment running elastalert, default/opt/elastalert/.env
-
node['pip-elastalert']['log_dir']
- logging directory for elastalert, default/var/log/elastalert
-
node['pip-elastalert']['supervisor']['logfile']
- stdout log file path for supervisor, default/var/log/elastalert/elastalert_supervisord.log
-
node['pip-elastalert']['supervisor']['logfile_maxbytes']
- max size of supervisor stdout log file, default1MB
-
node['pip-elastalert']['supervisor']['logfile_backups']
- no. of stdout log file backups, default2
-
node['pip-elastalert']['supervisor']['err_logfile']
- stderr log file path for supervisor, default/var/log/elastalert/elastalert_stderr.log
-
node['pip-elastalert']['supervisor']['err_logfile_maxbytes']
- max size of supervisor stderr log file, default5MB
-
node['pip-elastalert']['supervisor']['run_command']
- supervisor run command starting elastalert (see Elastalert docs), default/opt/elastalert/.env/bin/elastalert --config /opt/elastalert/config.yml --verbose
Recipes
recipes/default.rb
- does everything.
Testing
Tested with cookstyle, foodcritic, chefspec and kitchen tests using docker driver, build automatically
on Travis CI -> https://travis-ci.org/sleongkoan/elastalert-cookbook
Contributing
Fork repo and create pull request, all comments and feedback are welcome!
Dependent cookbooks
poise-python >= 0.0.0 |
supervisor >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
1.1.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
1.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.1.0 failed this metric
FC066: Ensure chef_version is set in metadata: pip_elastalert/metadata.rb:1
FC069: Ensure standardized license defined in metadata: pip_elastalert/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.1.0 passed this metric
Testing File Metric
1.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.1.0 failed this metric
1.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.1.0 failed this metric
FC066: Ensure chef_version is set in metadata: pip_elastalert/metadata.rb:1
FC069: Ensure standardized license defined in metadata: pip_elastalert/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.1.0 passed this metric
Testing File Metric
1.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.1.0 failed this metric
FC069: Ensure standardized license defined in metadata: pip_elastalert/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
1.1.0 passed this metric
Testing File Metric
1.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.1.0 failed this metric
1.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number