[chef] Re: Re: Re: Collectd for centos?


Chronological Thread 
  • From: Peter Donald < >
  • To:
  • Subject: [chef] Re: Re: Re: Collectd for centos?
  • Date: Wed, 18 Jul 2012 09:30:44 +1000

Hi,

On Wed, Jul 18, 2012 at 6:04 AM, Bryan Berry 
< >
 wrote:
> Tks bryan I look forward to seeing what u have.  I really need the write to
> graphite functionality

That is why we eventually went to creating a custom cookbook. You can
see the results up at [1] - we eventually went with compiling from
source which I would assume works with rhel. We have prototyped using
fpm to create a deb and presumably a rpm could be created in that
manner as well. Even if you develop your own I would recommend
yoinking out the LWRP and the attribute_driven recipe from [1] :)

It allows you to configure your collectd configuration via something
like the following. I also documented part of it at [2]

------------------------------------------------------------------------------------
node.override['collectd']['name'] = node['hostname']
node.override['collectd']['plugins'] =
  {
    'syslog' => {'config' => {"LogLevel" => "Info"}},
    'disk' => {},
    'swap' => {},
    'memory' => {},
    'cpu' => {},
    'interface' => {'config' => {"Interface" => "lo", "IgnoreSelected"
=> true}},
    'df' => {'config' => {"ReportReserved" => false,
                          "FSType" => ["proc", "sysfs", "fusectl",
"debugfs", "devtmpfs", "devpts", "tmpfs"],
                          "IgnoreSelected" => true}},
  }
graphite_host, graphite_port = ... # Use utility method to search for
graphite server
if graphite_host
  node.override['collectd']['plugins']['write_graphite'] =
      {'config' => {'Host' => graphite_host,
                    'Port' => graphite_port,
                    'Prefix' => "#{node.chef_environment}.node."}}
end

include_recipe "collectd::attribute_driven"
------------------------------------------------------------------------------------

[1] https://github.com/realityforge-cookbooks/collectd
[2] 
http://realityforge.org/code/2012/06/29/monitoring-as-part-of-the-definition-of-done.html
-- 
Cheers,

Peter Donald



Archive powered by MHonArc 2.6.16.

§