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


mackerel-agent (11) Versions 3.1.0

Installs/Configures mackerel-agent

cookbook 'mackerel-agent', '= 3.1.0', :supermarket
cookbook 'mackerel-agent', '= 3.1.0'
knife supermarket install mackerel-agent
knife supermarket download mackerel-agent
Quality 33%

cookbook-mackerel-agent Build Status

This cookbook provides recipes to install and configure mackerel-agent.
mackerel-agent is a server monitoring agent for .


  • Chef 12.5 or higher
    • For AmazonLinux 2, Chef 14.3.36 or higher is required.
  • Ruby 2.0

Workarounds for old chef (11.x ~ 12.4.x)

On old chef (11.x ~ 12.4.x), chef may throw error below:

Recipe Compile Error in /var/chef/cache/cache/cookbooks/yum/resources/globalconfig.rb

undefined method `property' for #<0x00000003c9a088>

This is because property method in latest apt / yum cookbooks does not exist before chef 12.5.

Chef 12.0.x ~ 12.4.x

Use compat_resource backports.

# Berksfile
cookbook 'compat_resource'

Chef 11.x

Specify apt cookbook and yum cookbook to use version prior to 4.0 in Berksfile.

# Berksfile
cookbook 'apt', '< 4.0'
cookbook 'yum', '< 4.0'


node.default['mackerel-agent']['conf']['apikey'] = 'Your API KEY' # required
node.default['mackerel-agent']['conf']['roles'] = ["My-Service:app", "Another-Service:db"] # optional

node.default['mackerel-agent']['conf']['plugin.metrics.vmstat'] = { # optional
  'command' => 'ruby /etc/sensu/plugins/system/vmstat-metrics.rb',

include_recipe 'mackerel-agent'
include_recipe 'mackerel-agent::plugins' # Option for installation of mackerel-agent-plugins package


The following attributes are set by default.
(CAUTION! node attribute namespace has changed since version 1.0.)

default['mackerel-agent']['package-action'] = :upgrade

You can customize agent configuration via following attributes.
(These attributes are set to nil by default and agent uses their default configuration)

default['mackerel-agent']['conf']['apikey']  = nil
default['mackerel-agent']['conf']['pidfile'] = nil # in Linux, agent's default: "/var/run/"
default['mackerel-agent']['conf']['root'] = nil # in Linux, agent's default: "/var/lib/mackerel-agent"
default['mackerel-agent']['conf']['verbose'] = nil # agent's default: false
default['mackerel-agent']['conf']['roles'] = nil

Not to start mackerel-agent when you create a static image (like AMI)

default['mackerel-agent']['start_on_setup'] = false

Configure environment variable options

You can configure environment variable options via the following attributes.
(These all attributes are set to nil by default)

default['mackerel-agent']['env_opts']['other_opts'] = nil
default['mackerel-agent']['env_opts']['auto_retirement'] = nil
default['mackerel-agent']['env_opts']['http_proxy'] = nil
default['mackerel-agent']['env_opts']['mackerel_agent_plugin_meta'] = nil


[Development Docuement](


Copyright:: 2014 Hatena Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

apt >= 0.0.0
yum >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

mackerel-agent Cookbook CHANGELOG

This file is used to list changes made in each version of the mackerel-agent cookbook.


Chef >= 14.3.36 is necessary for Amazon Linux 2 GA.

  • Fix around AmazonLinux 2 #41 (astj)
  • Add tests for Ubuntu 18.04 #39 (hayajo)
  • New URL for GPG-KEY-mackerel #38 (astj)


Chef 11.0~12.4 and/or Ruby 1.9.x are no more supported.

  • Support Amazon Linux 2 #37 (hayajo)
  • Remove yum cookbook version constraint (Drop Chef < 12.5 / Ruby 1.9 support) #35 (nonylene)
  • Lazily evaluate variables passed to env file template #34 (astj)


  • append stove dependency to Gemfile and renew Gemfile.lock #32 (Songmu)
  • Support v2 package repository #29 (astj)


  • Add more platforms' test #30 (astj)
  • Use TravisCI instead of CircleCI #28 (astj)
  • update README about default['mackerel-agent']['conf'] #27 (astj)
  • Support to configure environment variables opts #25 (spesnova)
  • Fixed #26 (kakakakakku)


  • Support new mackerel-agent for Amazon Linux #24 (by spesnova)


  • Change default mackerel-agent-plugins action into :upgrade.
  • Add node['mackerel-agent']['plugins']['package-action'] attribute.
  • Set compile_time to chef_gem for future compatibility (by sawanoboly)


  • Add installation of mackerel-agent-plugins package. (by koudaiii)


  • Change action of service[mackerel-agent] from restart to start (by sawanoboly)
  • Restart agent when package is newly installed or upgraded
  • Add node attribute start_on_setup.


  • Stable release

Collaborator Number Metric

3.1.0 failed this metric

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

Contributing File Metric

3.1.0 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 contain a file

Foodcritic Metric

3.1.0 passed this metric

No Binaries Metric

3.1.0 passed this metric

Testing File Metric

3.1.0 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 contain a file

Version Tag Metric

3.1.0 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