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


metric_maker (24) Versions 0.6.10

AWS CloudWatch custom metrics made easy

cookbook 'metric_maker', '~> 0.6.10'
cookbook 'metric_maker', '~> 0.6.10', :supermarket
knife supermarket install metric_maker
knife supermarket download metric_maker
Quality 75%


AWS CloudWatch metric publisher which runs from cron, you provide a script to gather the metric (collectors). Pair the collector up with a metric_maker resource call after installing.


  • ruby

Supported Platforms

Tested on:

  • Amazon Linux 2018
  • Ubuntu 16


Key Type Description Default
['metric_mater']['root'] String Path to base directory for metric maker to be installed /opt/metric_maker
['metric_maker']['interval'] Number Minute interval to run 1
['metric_maker']['region_override'] String Set the region not on EC2 instance with meta-data or would rather send metrics to a different region than that of the EC2 instance. (auto)


Simply include the metric_maker recipe to install the cron script, such as a run list of recipe[metric_maker] or a cookbook include_recipe 'metric_maker'.

To include with Berksfile use: cookbook 'metric_maker', git: ''

And metadata use: depends 'metric_maker', '~> 0.3.2'

Built in metric resources

There are are a few built in resource collectors. These resources include metric_maker_disk, metric_maker_cpu, metric_maker_free_mem. Here's an example of metric_maker_disk:

Root Disk Utilization Example

metric_maker_disk 'root_disk' do
  namespace 'prod'
  dimensions [
    {role: 'web-app'},
    {ip: ''}

Each of the built ins support the following (replace metric_maker_resource with one of the above)

metric_maker_resource 'name' do
 namespace                   String
 dimensions                  Array # list of {Key, Value} String pairs
 publish_with_no_dimension   True, False # default False

Example collector files/default/wave.rb:

#!/usr/bin/env ruby

puts (Math.sin( * 3 * 0.0174533) * 100).round(2)

Example metric_maker resource

metric_maker 'heart_beat' do
  namespace 'env'
  script 'wave.rb'
  unit 'Count'
  dimensions [
    {role: 'app-name'}
    {instance_id: instance_id}
  publish_with_no_dimension true

Full syntax for metric_maker

metric_maker 'name' do
 metric_name                 String # defaults to name
 namespace                   String # required
 dimensions                  Array # list of {Key, Value} String pairs default is []
 publish_with_no_dimension   True, False # default False
 script_content              String # use this for inline script collector definitions - first line should include the interpreter required if script not defined
 script_cookbook             String # if using script type you can define from which cookbook to read the cookbook_file from default is nil not required
 script                      cookbook_file String # use this for target your collector file - first line should include the interpreter. Required if not defining script_content
 unit                        String # default Count one of the following: ["Seconds", "Microseconds", "Milliseconds", "Bytes", "Kilobytes", "Megabytes", "Gigabytes", "Terabytes", "Bits", "Kilobits", "Megabits", "Gigabits", "Terabits", "Percent", "Count", "Bytes/Second", "Kilobytes/Second", "Megabytes/Second", "Gigabytes/Second", "Terabytes/Second", "Bits/Second", "Kilobits/Second", "Megabits/Second", "Gigabits/Second", "Terabits/Second", "Count/Second"]
 action                      Symbol # default :create [:create, :install]

Resource Helpers

insatnce_id is a function defined to return the an EC2 instance ID from meta-data

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric

0.6.10 failed this metric

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

Contributing File Metric

0.6.10 passed this metric

Foodcritic Metric

0.6.10 passed this metric

No Binaries Metric

0.6.10 passed this metric

Publish Metric

0.6.10 passed this metric

Supported Platforms Metric

0.6.10 passed this metric

Testing File Metric

0.6.10 passed this metric

Version Tag Metric

0.6.10 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, and your repo must include a tag that matches this cookbook version number