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


sensu (66) Versions 2.3.0

Installs/Configures Sensu

cookbook 'sensu', '= 2.3.0', :supermarket
cookbook 'sensu', '= 2.3.0'
knife supermarket install sensu
knife supermarket download sensu
Quality 0%


Provides LWRP's and service recipes to install and configure
Sensu, a monitoring framework.

This cookbook provides the building blocks for creating a monitoring
cookbook specific to your environment (wrapper). Without such a
wrapper, no Sensu configuration files will be created for your nodes.

An example wrapper cookbook can be found

How to Write Reusable Chef Cookbooks


This cookbook comes with a Gemfile, Cheffile, and a Vagrantfile for
testing and evaluating Sensu.

cd examples
gem install bundler
bundle install
librarian-chef install
vagrant up
vagrant ssh



SSL configuration

Running Sensu with SSL is recommended; this cookbook uses a data bag
sensu, with an item ssl, containing the SSL certificates required.
Sensu data bag items may be encrypted. This cookbook comes with a tool
to generate the certificates and data bag item. If the integrity of
the certificates is ever compromised, you must regenerate and redeploy

cd examples/ssl
./ generate
knife data bag create sensu

Use the plain-text data bag item:

knife data bag from file sensu ssl.json

Or, encrypt it with your data bag secret. See Encrypt a Data
more information.

knife data bag --secret-file /path/to/your/secret from file sensu ssl.json
./ clean



Installs Sensu and creates a base configuration file, intended to be
extended. This recipe must be included before any of the Sensu LWRP's
can be used. This recipe does not enable or start any services.


Installs and configures RabbitMQ for Sensu, from configuring SSL to
creating a vhost and credentials. This recipe relies heavily on the
community RabbitMQ cookbook LWRP's.


Installs and configures Redis for Sensu. This recipe uses the
RedisIO cookbook and installs Redis from source.


Installs and configures Sensu Enterprise.


Enables and starts the Sensu server.


Enables and starts the Sensu client.


Enables and starts the Sensu API.


Enables and starts Sensu Enterprise.



node.sensu.version - Sensu build to install.

node.sensu.use_unstable_repo - If the build resides on the
"unstable" repository. - Sensu configuration directory.

node.sensu.log_directory - Sensu log directory.

node.sensu.log_level - Sensu log level (eg. "warn").

node.sensu.use_ssl - If Sensu and RabbitMQ are to use SSL.

node.sensu.user - The user who owns all sensu files and directories. Default
"sensu". - The group that owns all sensu files and directories.
Default "sensu".

node.sensu.use_embedded_ruby - If Sensu Ruby handlers and plugins
use the embedded Ruby in the Sensu package.

node.sensu.init_style - Style of init to be used when configuring
Sensu services, "sysv" and "runit" are currently supported.

node.sensu.service_max_wait - How long service scripts should wait
for Sensu to start/stop.

RabbitMQ - RabbitMQ host.

node.sensu.rabbitmq.port - RabbitMQ port, usually for SSL.

node.sensu.rabbitmq.ssl - RabbitMQ SSL configuration, DO NOT EDIT THIS.

node.sensu.rabbitmq.vhost - RabbitMQ vhost for Sensu.

node.sensu.rabbitmq.user - RabbitMQ user for Sensu.

node.sensu.rabbitmq.password - RabbitMQ password for Sensu.

Redis - Redis host.

node.sensu.redis.port - Redis port.

Sensu API - Sensu API host, for other services to reach it.

node.sensu.api.bind - Sensu API bind address.

node.sensu.api.port - Sensu API port.


Define a client

sensu_client do
  address node.ipaddress
  subscriptions node.roles + ["all"]
  additional(:cluster => node.cluster)

Define a handler

sensu_handler "pagerduty" do
  type "pipe"
  command "pagerduty.rb"
  severities ["ok", "critical"]

Define a check

sensu_check "redis_process" do
  command "check-procs.rb -p redis-server -C 1"
  handlers ["default"]
  subscribers ["redis"]
  interval 30
  additional(:notification => "Redis is not running", :occurrences => 5)

Define a filter

sensu_filter "environment" do
  attributes(:client => {:environment => "development"})
  negate true

Define a mutator

sensu_mutator "opentsdb" do
  command "opentsdb.rb"

Define a custom configuration snippet

sensu_snippet "irc" do
  content(:uri => "irc://")


Please visit for details on community and commercial
support resources, including the official IRC channel.

2.3.0 - 2014-12-18


Reordered RabbitMQ attribute overrides and recipe includes.

Fixed Windows sensu-client service install resource gate.


Sensu Enterprise recipes, install and service.

Sanitize helper works with delayed eval values.

YUM allow downgrade for the Sensu package.

Sensu user & group attributes.


Bumped the default version of Sensu to 0.16.0-1.

ChefSpec matchers.

2.2.0 - 2014-10-23


Dropped content data type requirements for the Sensu configuration
snippet LWRP, sensu_snippet, as it may be a string or array etc.

2.1.0 - 2014-10-03

Non-backwards compatible changes

The Sensu amqp handler type is now transport, and has the
configuration definition attribute of pipe instead of


Including the redisio::default recipe in the redis recipe, in order to
support all current versions of the cookbook.


Bumped the default version of Sensu to 0.14.0-1.

2.0.0 - 2014-07-25

Non-backwards compatible changes

Removed the Sensu Dashboard service recipe, dashboard_service, and
associated cookbook attributes, as the dashboard is no longer part of
Sensu core.


Don't create the sensu user with a random password on Windows, if it
already exists.


Added Sensu extension directory to Windows service configuration.

Windows package options and DISM source cookbook attributes.

Added the sensu_asset and sensu_plugin LWRPs for fetching/installing
Sensu plugins etc.


Bumped the default version of Sensu to 0.13.0-1.

Cleaned up Linux package installation recipe.

1.0.0 - 2014-04-23


Windows installation fixes/improvements.


Random password generator helper.

Support for Amazon Linux.

Cookbook attribute for admin_user, defaulting to "root" for Linux,
"Administrator" for Windows. This allows recipes to be used on both

0.8.0 - 2014-01-02


Cookbook attributes for Sensu repository URLs.

Validate Sensu client and check names with LWRPs.

Support for Sensu client keepalive configuration.

Support for Sensu aggregate check configuration.

0.7.1 - 2013-12-19


Bumped the default version of Sensu to 0.12.3-1.

0.7.0 - 2013-12-19


Sensu LWRPs now properly set updated_by_last_action().

The Yum cookbook >= 3.0 is now supported, and gpgcheck is set to false
when the resource attribute is available.


Embedded Runit support for Sensu services. The init_style defaults to
"sysv", but can be changed to "runit". The sensu_service LWRP is used in
service recipes, eg. sensu::server_service.

Data bag item helper, supported plain-text and encrypted Sensu data bag

Sensu configuration through attributes is now merged with Sensu data bag
items, supporting encrypted secrets.


Bumped the default version of Sensu to 0.12.2-1.

Updated tests to use ServerSpec, using a wrapper cookbook called

0.6.2 - 2013-10-28


Bumped the default version of Sensu to 0.12.0-1.

0.6.1 - 2013-10-26


Bumped the default version of Sensu to 0.11.3-1.

Updated example Vagrantfile to use Ubuntu 13.04.

0.6.0 - 2013-10-02

Non-backwards compatible changes

Redis recipe, switched to redisio cookbook. The cookbook is available
on the OpsCode community site & has better platform/release support.

Foodcritic Metric

2.3.0 failed this metric

FC015: Consider converting definition to a LWRP: /tmp/cook/f1b1b348f8e5adc9d83ed4e4/sensu/definitions/silence_check.rb:1
FC015: Consider converting definition to a LWRP: /tmp/cook/f1b1b348f8e5adc9d83ed4e4/sensu/definitions/silence_client.rb:1
FC023: Prefer conditional attributes: /tmp/cook/f1b1b348f8e5adc9d83ed4e4/sensu/definitions/silence_check.rb:19
FC023: Prefer conditional attributes: /tmp/cook/f1b1b348f8e5adc9d83ed4e4/sensu/definitions/silence_client.rb:14
FC023: Prefer conditional attributes: /tmp/cook/f1b1b348f8e5adc9d83ed4e4/sensu/recipes/_windows.rb:35