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


chef_handler_elasticsearch (4) Versions 1.0.0

Add elasticsearch report handler to chef-client

cookbook 'chef_handler_elasticsearch', '= 1.0.0', :supermarket
cookbook 'chef_handler_elasticsearch', '= 1.0.0'
knife supermarket install chef_handler_elasticsearch
knife supermarket download chef_handler_elasticsearch
Quality -%

chef_handler_elasticsearch Cookbook

This cookbook add handler for post reports to elasticsearch like logstash style.

Reports are shown by kibana easily.





Put Chef-Client reports to elasticsearch.



  • node[:chef_handler_elasticsearch][:url]
    • Elasticsearch endpoint.
    • default: 'http://localhost:9200'
  • node[:chef_handler_elasticsearch][:timeout]
    • Request for Elasticsearch timeout.
    • default: 3 (second)
  • node[:chef_handler_elasticsearch][:prefix]
    • Prefix for index name. e.g: chef_handler-2014.05.21
    • default: 'chef_handler'
  • node[:chef_handler_elasticsearch][:index_date_format]
    • Date section format of index name. e.g: chef_handler-2014.05.21
    • default: "%Y.%m.%d"
  • node[:chef_handler_elasticsearch][:index_use_utc]
    • Use utc to index name.
    • default: true

elasticsearch template settings.

  • node[:chef_handler_elasticsearch][:prepare_template]
    • Create or update index template before put data.
    • default: true
  • node[:chef_handler_elasticsearch][:template_order] = 10
    • Index template order.
    • default: true
  • node[:chef_handler_elasticsearch][:mappings] = '{
    • Index template mapping.
    • default: "_default_" : { "numeric_detection" : true, "dynamic_date_formats" : ["yyyy-MM-dd HH:mm:ss Z", "date_optional_time"] } }'



Add Chef::Handler::Elasticsearch to chef config.


Add to Chef::Config

e.g. your recipes, libraries.

Chef::Config[:report_handlers] <<
Chef::Config[:exception_handlers] <<

You can pass settings as argument at initialize.

Chef::Config[:report_handlers] <<
  url: '',
  timeout: 10,

Add run_list

add recipe[chef_handler_elasticsearch::default] your run_list.

You can override default settings with chef layers. Such as role, environment, or node.json.

  "chef_handler_elasticsearch" : {
    "url" : "",
    "timeout" : 10


  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

License: apache2

Author: SAWANOBORI Yukihiko(Higanworks LLC)

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

No quality metric results found