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

opentsdb_handler (2) Versions 0.1.1

Installs/Configures opentsdb_handler

Policyfile
Berkshelf
Knife
cookbook 'opentsdb_handler', '~> 0.1.1', :supermarket
cookbook 'opentsdb_handler', '~> 0.1.1'
knife supermarket install opentsdb_handler
knife supermarket download opentsdb_handler
README
Dependencies
Changelog
Quality 50%

opentsdb_handler Cookbook

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

Requirements

The only requirement is the chef_handler cookbook

Attributes

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['opentsdb_handler']['metrics']</tt></td>
<td>Hash</td>
<td>this is where each metric to be sent is defined as { unique_name => metric_hash }</td>
<td><tt>{}</tt></td>
</tr>
<tr>
<td><tt>['opentsdb_handler']['metric'][unique_name]['name']</tt></td>
<td>String</td>
<td>Metric name</td>
<td><tt>None</tt></td>
</tr>
<tr>
<td><tt>['opentsdb_handler']['metrics'][unique_name]['value']</tt></td>
<td>Hash</td>
<td>Value of metric</td>
<td><tt>None</tt></td>
</tr>
<tr>
<td><tt>['opentsdb_handler']['metrics'][unique_name]['tags']</tt></td>
<td>Hash</td>
<td>Key => Value hash of tags for the metric.</td>
<td><tt>{'hostname' => Socket.gethostname}(IN HANDLER SCRIPT)</tt></td>
</tr>
<tr>
<td><tt>['opentsdb_handler'][handler_name]['run_status_tag']</tt></td>
<td>Boolean</td>
<td>Will add run_status=0|1 (success, failure respectively) tag if true</td>
<td><tt>false</tt></td>
</tr>
<tr>
<td><tt>['opentsdb_handler']['run_status']['elapsed_time'|'start_time'|'end_time']</tt></td>
<td>Boolean</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><tt>false</tt></td>
</tr>
<tr>
<td><tt>['opentsdb_handler']['hostname']</tt></td>
<td>opentsdb</td>
<td>Hostname of OpenTSDB server</td>
<td><tt>opentsdb (IN HANDLER SCRIPT)</tt></td>
</tr>
<tr>
<td><tt>['opentsdb_handler']['port']</tt></td>
<td>Integer</td>
<td>Port of OpenTSDB server</td>
<td><tt>4242 (IN HANDLER SCRIPT)</tt></td>
</tr>
<tr>
<td><tt>['opentsdb_handler']['timeout']</tt></td>
<td>Integer</td>
<td>Timeout before failing to send to metric</td>
<td><tt>10 (IN HANDLER SCRIPT)</tt></td>
</tr>
</table>

Usage

opentsdb_handler::default

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.

Contributing

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

Testing

Integration tests are run with test-kitchen, kitchen-vagrant, and [serverspec](serverspec.org) 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

Authors: michael.wood@optimizely.com

Dependent cookbooks

chef_handler ~> 1.2.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

opentsdb_handler CHANGELOG

0.1.1

  • [mi-wood] - Fix logging

0.1.0

  • [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.

Collaborator Number Metric
            

0.1.1 failed this metric

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

Contributing File Metric
            

0.1.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
            

0.1.1 passed this metric

No Binaries Metric
            

0.1.1 passed this metric

Testing File Metric
            

0.1.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
            

0.1.1 passed this metric