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


opentsdb_handler (2) Versions 0.1.0

Installs/Configures opentsdb_handler

cookbook 'opentsdb_handler', '= 0.1.0', :supermarket
cookbook 'opentsdb_handler', '= 0.1.0'
knife supermarket install opentsdb_handler
knife supermarket download opentsdb_handler
Quality 100%

opentsdb_handler Cookbook

This cookbook sets up a handler that reports to OpenTSDB at the end of a chef run


The only requirement is the chef_handler cookbook


<td>this is where each metric to be sent is defined as { unique_name => metric_hash }</td>
<td>Metric name</td>
<td>Value of metric</td>
<td>Key => Value hash of tags for the metric.</td>
<td><tt>{'hostname' => Socket.gethostname}(IN HANDLER SCRIPT)</tt></td>
<td>Will add run_status=0|1 (success, failure respectively) tag if true</td>
<td>Will send a metric of the chef.elapsed_time (or start_time or end_time) if true. Change tags on ['handlers']['elapsed_time']['tags']</td>
<td>Hostname of OpenTSDB server</td>
<td><tt>opentsdb (IN HANDLER SCRIPT)</tt></td>
<td>Port of OpenTSDB server</td>
<td><tt>4242 (IN HANDLER SCRIPT)</tt></td>
<td>Timeout before failing to send to metric</td>
<td><tt>10 (IN HANDLER SCRIPT)</tt></td>



Include opentsdb_handler in your node's run_list and add the following attributes:

node.default['opentsdb_hander']['metrics']['flying_puppy_metric']['name'] = 'flying_puppy.metric'
node.default['opentsdb_hander']['metrics']['flying_puppy_metric']['value'] = 10
# Optional
node.default['opentsdb_hander']['metrics]['flying_puppy_metric']['tags'] = {"breed" => "corgi"}

You can add as many metrics to this hash as you want. The timestamp will be created at the start of the handler.


  1. Fork the repository on Github
  2. bundle install
  3. Make changes
  4. Test your changes Testing


Integration tests are run with test-kitchen, kitchen-vagrant, and [serverspec]( for integration testing. You can take a look at [.kitchen.yml] for how tests are set up. Run with:

rake kitchen:all

Unit testing is run with ChefSpec

Linting is done with foodcritic and rubocop

Run unit and linting with:

rake test

License and Authors


Dependent cookbooks

chef_handler ~> 1.2.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

opentsdb_handler CHANGELOG

This file is used to list changes made in each version of the opentsdb_handler cookbook.


  • [mi-wood] - Initial release of opentsdb_handler

Check the Markdown Syntax Guide for help with Markdown.

The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.

Foodcritic Metric

0.1.0 passed this metric