Skip to content
Chef cookbook for collectd
Ruby Shell
Find file
Pull request Compare This branch is 84 commits ahead, 13 commits behind coderanger:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
attributes Issue #750: fixed NoMethodError accessing node["monitoring"]["configs"] Dec 21, 2013
definitions copyright updates Jul 22, 2013
files/ubuntu make collectd die. die. die...properly Dec 4, 2012
libraries make foodcritic 2.10 and tailor (almost) happy May 30, 2013
recipes Merge pull request #31 from darxriggs/wget-replacement Dec 22, 2013
spec Upgrade to Test Kitchen 1.x Jun 13, 2013
test copyright updates Jul 22, 2013
.gitignore Upgrade to Test Kitchen 1.x Jun 13, 2013
.kitchen.local.yml.example Upgrade to Test Kitchen 1.x Jun 13, 2013
.ruby-version.example Upgrade to Test Kitchen 1.x Jun 13, 2013
Berksfile Upgrade to Test Kitchen 1.x Jun 13, 2013 Add contribution guidance Aug 15, 2013
Gemfile Upgrade to Test Kitchen 1.x Jun 13, 2013
Gemfile.lock Upgrade to Test Kitchen 1.x Jun 13, 2013 Add contribution guidance Aug 15, 2013 Upgrade to Test Kitchen 1.x Jun 13, 2013
TODO Upgrade to Test Kitchen 1.x Jun 13, 2013
VERSION Merge branch 'master' of into ha… Oct 23, 2013
Vagrantfile Issue #748: support for Vagrant >= 1.3.0 Dec 21, 2013
chefignore Upgrade to Test Kitchen 1.x Jun 13, 2013
metadata.rb move version out of metadata.rb into VERSION Oct 11, 2013


Issues have been disabled for this repository.
Any issues with this cookbook should be raised here:

Please title the issue as follows:

[collectd]: <short description of problem>

In the issue description, please include a longer description of the issue, along with any relevant log/command/error output.
If logfiles are extremely long, please place the relevant portion into the issue description, and link to a gist containing the entire logfile

Please see the contribution guidelines for more information about contributing to this cookbook.


Chef 11.0 or higher required (for Chef environment use).


This cookbook is actively tested on the following platforms/versions:

  • Ubuntu-12.04
  • CentOS-6.3

While not actively tested, this cookbook should also work the following platforms:

  • Debian/Mint derivitives
  • Amazon/Oracle/Scientific/RHEL


The following cookbooks are dependencies:

  • apache2
  • collectd-plugins
  • yum


  • collectd.basedir - Base folder for collectd output data.
  • collectd.plugin_dir - Base folder to find plugins.
  • collectd.types_db - Array of files to read graph type information from.
  • collectd.interval - Time period in seconds to wait between data reads.

  • collectd.collectd_web.path - Location to install collectd_web to. Defaults to /srv/collectd_web.

  • collectd.collectd_web.hostname - Server name to use for collectd_web Apache site.


Three main recipes are provided:

  • collectd - Install a standalone daemon.
  • collectd::client - Install collectd and configure it to send data to a server.
  • collectd::server - Install collectd and configure it to recieve data from clients.

The client recipe will use the search index to automatically locate the server hosts, so no manual configuration is required.


Several defines are provided to simplfy configuring plugins


The collectd_plugin define configures and enables standard collect plugins. Example:

collectd_plugin "interface" do
  options :interface=>"lo", :ignore_selected=>true

The options hash is converted to collectd-style settings automatically. Any symbol key will be converted to camel-case. In the above example :ignore_selected will be output as the key "IgnoreSelected". If the key is already a string, this conversion is skipped. If the value is an array, it will be output as a separate line for each element.


The collectd_python_plugin define configures and enables Python plugins using the collectd-python plugin. Example:

collectd_python_plugin "redis" do
  options :host=>servers, :verbose=>true

Options are interpreted in the same way as with collectd_plugin. This define will not deploy the plugin script as well, so be sure to setup a cookbook_file resource or other mechanism to handle distribution. Example:

cookbook_file File.join(node[:collectd][:plugin_dir], "") do
  owner "root"
  group "root"
  mode "644"

Web frontend

The collectd::collectd_web recipe will automatically deploy the collectd_web frontend using Apache. The apache2 cookbook is required for this and is not included automatically as this is an optional component, so be sure to configure the node with the correct recipes.


Author:: Noah Kantrowitz ( Copyright:: 2010, Atari, Inc

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, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Something went wrong with that request. Please try again.