Skip to content

monigusto/chef-collectd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DESCRIPTION

Configure and install the collectd monitoring daemon.

REQUIREMENTS

This cookbook has only been tested on Ubuntu 10.04.

To use the collectd::collectd_web recipe you need the apache2 cookbook.

The collectd_plugins cookbook is not required, but provides many common plugin definitions for easy reuse.

ATTRIBUTES

  • 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.server_role - Name of the Chef Role to look for to identity a server. Defaults to collectd_server

  • collectd.server_ip - IP address of collectd server to use

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

  • collectd.collectd_web.http_port - Port the virtualhost Apache listens on

  • collectd.enable_rrdtool_plugin - Should this recipe enable a default rrdtool plugin? Defaults to true

USAGE

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.

Defines

This recipe does not install any plugins, if you want you had to include this recipe from your own recipe and add them there.

Several defines are provided to simplfy configuring plugins

collectd_plugin

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

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

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.

collectd_python_plugin

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
end

Some plugins require you to maintain the Case Sensitivity . This cookbook follows the ruby convention to do this. Note (carbon_writer does not get install, it's just an example)

collectd_python_plugin "carbon_writer" do
  options  :line_receiver_host      => "127.0.0.1",
  :line_receiver_port               => 2003,
  :differentiate_counters_over_time => true,
  :lowercase_metric_names           => true,
  :types_db                         => "/usr/share/collectd/types.db"
end

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], "redis.py") do
  owner "root"
  group "root"
  mode "644"
end

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.

LICENSE & AUTHOR

Author:: Noah Kantrowitz (noah@coderanger.net) 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

http://www.apache.org/licenses/LICENSE-2.0

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.

About

Chef cookbook for collectd

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%