Skip to content

Commit

Permalink
Whisper updates
Browse files Browse the repository at this point in the history
  • Loading branch information
smith committed Mar 25, 2012
1 parent 9e97ddf commit e6aa24e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 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 "www-data"
group "www-data"
notifies :restart, 'service[carbon-cache]'
end

execute "carbon: change graphite storage permissions to www-data" do
Expand Down
2 changes: 1 addition & 1 deletion recipes/whisper.rb
Expand Up @@ -18,6 +18,6 @@
end

execute 'install whisper utils' do
command "cp -R /usr/src/whisper-#{version}/bin/* /opt/graphite/bin"
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 e6aa24e

Please sign in to comment.