Skip to content

Commit

Permalink
Merge branch 'retention'
Browse files Browse the repository at this point in the history
Conflicts:
	recipes/carbon.rb
  • Loading branch information
smith committed Mar 25, 2012
2 parents 20a8dc4 + e6aa24e commit 31f3ee2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
8 changes: 8 additions & 0 deletions attributes/graphite.rb
Expand Up @@ -12,6 +12,14 @@
default[:graphite][:carbon][:line_receiver_interface] = "127.0.0.1"
default[:graphite][:carbon][:pickle_receiver_interface] = "127.0.0.1"
default[:graphite][:carbon][:cache_query_interface] = "127.0.0.1"
default['graphite']['carbon']['storage_schemas'] = [
{
:name => :catchall,
:priority => 0,
:pattern => '^.*',
:retentions => '10s:6h,1m:7d,10m:5y'
}
]

default[:graphite][:password] = "change_me"
default[:graphite][:url] = "graphite"
1 change: 1 addition & 0 deletions recipes/carbon.rb
Expand Up @@ -32,6 +32,7 @@
template "/opt/graphite/conf/storage-schemas.conf" do
owner node['apache']['user']
group node['apache']['group']
notifies :restart, 'service[carbon-cache]'
end

execute "carbon: change graphite storage permissions to apache user" do
Expand Down
5 changes: 5 additions & 0 deletions recipes/whisper.rb
Expand Up @@ -16,3 +16,8 @@
creates "/usr/local/lib/python2.6/dist-packages/whisper-#{version}.egg-info"
cwd "/usr/src/whisper-#{version}"
end

execute 'install whisper utils' do
command "cp /usr/src/whisper-#{version}/bin/* /opt/graphite/bin"
creates '/opt/graphite/bin/rrd2whisper.py' # and more
end
14 changes: 10 additions & 4 deletions templates/default/storage-schemas.conf.erb
@@ -1,4 +1,10 @@
[catchall]
priority = 0
pattern = ^.*
retentions = 60:100800,900:63000
# Carbon storage schemas.See http://readthedocs.org/docs/graphite/en/latest/config-carbon.html#storage-schemas-conf
#
# Generated by Chef

<% node['graphite']['carbon']['storage_schemas'].each do |schema| %>
[<%= schema[:name] %>]
priority = <%= schema[:priority] %>
pattern = <%= schema[:pattern] %>
retentions = <%= schema[:retentions] %>
<% end %>

0 comments on commit 31f3ee2

Please sign in to comment.