Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

simple-logstash (16) Versions 1.0.1

Installs/Configures simple-logstash. No less. No more.

Policyfile
Berkshelf
Knife
cookbook 'simple-logstash', '= 1.0.1', :supermarket
cookbook 'simple-logstash', '= 1.0.1'
knife supermarket install simple-logstash
knife supermarket download simple-logstash
README
Dependencies
Quality 50%

Description

This cookbook installs only logstash and provides few typical configurations.
It doesn't install or depends on java, apache, nginx, elasticsearch, kibana, etc...

It also skips lumberjack.

Usage

Default recipe only creates user/group and arks logstash.
You are free to do anything with installation.

Also cookbook provides HWRPs for managing services and configs of logstash.
You can define multiple services and configs.

HWRP

logstash_config

Generic HWRP for managing logstashs' configs. It also creates parent directory for your config.
You better want to use its child classes.

Actions

  • create - default, creates new config
  • delete - deletes config

Attributes

  • user - sets owner of the config file. Defaults to logstash
  • group - sets group of config file. Defaults to logstash
  • prefix_conf - sets prefix configuration dir. Defaults to /etc
  • service - sets logstash service name config belongs to. Defaults to logstash
  • config_dir - sets logstash config dir with pipelines. Defaults to conf.d
  • config_name - sets logstash config name. Defaults to <name>.conf
  • template_source - sets config template to use. Defaults to logstash/<name>.conf.erb
  • template_mode - sets mode on the config file. Defaults to 0640
  • template_variables - set variables for the config template. Defaults to {}

logstash_input

This resource based on logstash_config. It has the same actions and attributes.
But it has some different default values:

  • config_name - Defaults to /etc/<service>/10_input_<name>.conf
  • template_source - Defaults to logstash/input/<name>.conf.erb

logstash_filter

This resource based on logstash_config. It has the same actions and attributes.
But it has some different default values:

  • config_name - Defaults to /etc/<service>/20_filter_<name>.conf
  • template_source - Defaults to logstash/filter/<name>.conf.erb

logstash_output

This resource based on logstash_config. It has the same actions and attributes.
But it has some different default values:

  • config_name - Defaults to /etc/<service>/90_output_<name>.conf
  • template_source - Defaults to logstash/output/<name>.conf.erb

logstash_service

Defines logstash service. Currentl supported implementations:

  • base - for internal use
  • systemd
  • runit

Cookbook tries to use systemd, but fallbacks to the runit.

Consider:

  • [Base Service Implementation](libraries/logstash_service_base.rb)
  • [Systemd Implementation](libraries/logstash_service_systemd.rb)
  • [Runit Implementation](libraries/logstash_service_runit.rb)

Actions

  • start - default, enables and starts a service
  • stop - stops and disables a service
  • restart - restarts a service

Attributes

  • user - sets owner of the config file. Defaults to logstash
  • group - sets group of config file. Defaults to logstash
  • daemon_path - path to binary to execute. Defaults to /opt/logstash/bin/logstash
  • env - optional environment variables to set. Defaults to {}
  • config_path - sets path to a config or directory to use. Defaults to /etc/<name>/conf.d
  • data_path - sets path to a data directory. Defaults to /var/lib/<name>/data
  • logs_path - sets path to a log directory. Defaults to /var/log/<name>
  • pipeline_workers - number of working threads. See logstash documentation. Defaults to 1
  • max_open_files - sets maximum files allowed to open by process. Defaults to 16384
  • custom_args - optional string with additional custom arguments passed to logstash. Defaults to ''

Attributes to customize logstash flags:

  • config_path_flag - flag for config path. Defaults to --path.config
  • data_path_flag - flag for data path. Defaults to --path.data
  • logs_path_flag - flag for logs path. Defaults to --path.logs
  • pipeline_workers_flag - flag for pipeline workers. Defaults to --pipeline.workers

Example

You can visit fixture cookbook [simple-logstash-test](test/fixtures/cookbooks/simple-logstash-test)

Requirements

Chef Client:

  • chef (>= 12.6) ()

Platform:

  • debian (>= 8.0)
  • ubuntu (>= 16.0)
  • centos (>= 7.0)

Cookbooks:

  • ark
  • runit

Attributes

  • node['logstash']['download_url'] - Defaults to https://artifacts.elastic.co/downloads/logstash/logstash-6.2.3.tar.gz.
  • node['logstash']['checksum'] - Defaults to 0c326917ce035543e44042e95042d2e6f80f5b9119f514dbe275b236b964cbe7.
  • node['logstash']['version'] - Defaults to 6.2.3.
  • node['logstash']['user'] - Defaults to logstash.
  • node['logstash']['group'] - Defaults to logstash.
  • node['logstash']['prefix_root'] - Defaults to /opt.

Recipes

  • simple-logstash::default - Installs/Configures simple-logstash. No less. No more.

License and Maintainer

Maintainer:: Yauhen Artsiukhou (jsirex@gmail.com)

Source:: https://github.com/jsirex/simple-logstash-cookbook

Issues:: https://github.com/jsirex/simple-logstash-cookbook/issues

License:: Apache-2.0

Dependent cookbooks

ark >= 0.0.0
runit >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

1.0.1 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.0.1 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.0.1 passed this metric

No Binaries Metric
            

1.0.1 passed this metric

Testing File Metric
            

1.0.1 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.0.1 passed this metric