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

sensu_spec (40) Versions 0.4.1

Installs/Configures sensu_spec

Policyfile
Berkshelf
Knife
cookbook 'sensu_spec', '= 0.4.1', :supermarket
cookbook 'sensu_spec', '= 0.4.1'
knife supermarket install sensu_spec
knife supermarket download sensu_spec
README
Dependencies
Quality -%

sensu_spec cookbook

This cookbook is an attempt at blurring the boundary between TDD and monitoring. It provides an LWRP that creates Sensu client configuration files that are processed by a minitest-chef-handler test for testing, or can be used by sensu in the traditional way.

At the moment it only creates the config files locally, but in future it will use attributes to make the configuration data available to a chef-managed sensu server.

At the moment, this cookbook is completely independant from any sensu cookbooks. This may change in future.

Requirements

Uses apt cookbook for debian-like systems and yum-epel for rhel family systems, primarily to install nagios plugins.

Usage

Basic example

The simplest usage is just to provide a command

sensu_spec 'check http availability' do
   command 'check_http -H localhost'
end

Something more specific

sensu_spec 'check ruby version' do
  command 'check_cmd -c "ruby --version" -o "1.9.3"'
  interval 120
  handlers [ 'ruby' ]
end

You can then run sensu_spec from the command line

$ sensu_spec
check_http_availability OK

check_ruby_version CRITICAL
CRITICAL - Output 'ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.0.0]' did not match '1.9.3'

Some tests failed

This command is automatically run by minitest. See files/default/test/default_test.rb.

Attributes

See attributes/default.rb for default values.

  • node['sensu_spec']['conf_dir'] - Location of sensu check config
  • node['sensu_spec']['nagios']['plugins_path'] - Location of nagios plugins
  • node['sensu_spec']['nagios']['packages'] - Name of nagios plugins package
  • node['sensu_spec']['default_command_path'] - Path to use for relative commands
  • node['sensu_spec']['retry_count'] - Number of times to retry a test
  • node['sensu_spec']['retry_sleep'] - Number of seconds to sleep between test retries

Recipes

  • default - Includes the client recipe
  • client - Installs require directory and nagios packages etc.

Author

Author:: fraser.scott@gmail.com

No quality metric results found