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

logstash_simple (4) Versions 0.0.4

Installs/Configures logstash

Policyfile
Berkshelf
Knife
cookbook 'logstash_simple', '~> 0.0.4', :supermarket
cookbook 'logstash_simple', '~> 0.0.4'
knife supermarket install logstash_simple
knife supermarket download logstash_simple
README
Dependencies
Changelog
Quality 17%

logstash_simple cookbook

Very basic LWRP cookbook for installing Logstash via tar.gz (or rpm) on CentOS systems (will add Ubuntu support in future). Service is managed via Systemd scripts provided in the cookbook instead of using runit as per most other cookbooks.

Pre-requisites

Java Runtime Logtash requires Java 1.7+ however the resources in this cookbook do not facilitate this.

This cookbook requires Chef 12.6.0+

Supported Platforms

This has been tested on CentOS 7.1

Recipes

This cookbook provides a default recipe to give an example of how to make use of the included Chef resources.

logtash_simple::default

Installs Logstash 2.1.1 from tar.gz to /usr/local/logstash.

Includes sample syslog input in /etc/logstash/conf.d/logstash_test.conf that listens for syslog messages on TCP/UDP 5000.

Enables and starts service via Systemd with included scripts.

Usage

Include logstash_simple in your node's run_list:


{
  "run_list": [
    "recipe[logstash_simple::default]"
  ]
}

Resources

logstash_simple_instance

This resource downloads and installs Logstash

Example:
```

logstash_simple_instance 'logstash' do
package_type 'tarball'
package_url 'https://download.elastic.co/logstash/logstash/logstash-2.1.1.tar.gz'
package_checksum '2ea975e16a02b416a5bd9eed5ab280224820f278d54f6e0ec4cccf0d8f5ca610'
logstash_directory '/usr/local/logstash'
logstash_version '2.1.1'
logstash_log_directory '/var/log/logstash'
logstash_config_directory '/etc/logstash/conf.d'
logstash_user 'logstash'
logstash_group 'logstash'
logstash_heap_size '300M'
action :create
end


### logstash_simple_config

This resource uses the given input, filter and output configuration and generates a logstash config file.

Use multiple logstash_simple_config resources to create multiple config files.

Example:

logstash_simple_config 'logstash' do
input <<-EOF
input {
tcp {
port => 5000
type => syslog
}
udp {
port => 5000
type => syslog
}
}
EOF
filter <<-EOF
filter {

}
EOF
output <<-EOF
output {

}
EOF
path logtash_config
name 'logstash_test.conf'
action :create
end


## logstash_simple_service

This resource manages the Logstash service via Systemd.

The service can be enabled, disabled, stopped or started.

Example:

logstash_simple_service 'logstash' do
action [ :enable, :start ]
end


## License and Authors

Author:: Thomas Riley

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

0.1.0

Initial release of logstash

Collaborator Number Metric
            

0.0.4 failed this metric

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

Contributing File Metric
            

0.0.4 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
            

0.0.4 failed this metric

FC007: Ensure recipe dependencies are reflected in cookbook metadata: logstash_simple/recipes/default.rb:9
FC034: Unused template variables: logstash_simple/templates/default/config_template.erb:1
FC034: Unused template variables: logstash_simple/templates/default/logstash.environment.erb:1
FC066: Ensure chef_version is set in metadata: logstash_simple/metadata.rb:1
FC069: Ensure standardized license defined in metadata: logstash_simple/metadata.rb:1
FC108: Resource should not define a property named 'name': logstash_simple/resources/config.rb:4
FC120: Do not set the name property directly on a resource: logstash_simple/recipes/default.rb:49
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.0.4 passed this metric

Testing File Metric
            

0.0.4 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
            

0.0.4 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