Skip to content

Commit

Permalink
graphite listen on localhost by default
Browse files Browse the repository at this point in the history
  • Loading branch information
dje committed Mar 6, 2011
1 parent 36e2179 commit f1235cf
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
6 changes: 6 additions & 0 deletions attributes/graphite.rb
@@ -1,9 +1,15 @@
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][:version] = "0.9.7" default[:graphite][:carbon][:version] = "0.9.7"
default[:graphite][:carbon][:uri] = "http://launchpadlibrarian.net/61904798/carbon-0.9.7.tar.gz" default[:graphite][:carbon][:uri] = "http://launchpadlibrarian.net/61904798/carbon-0.9.7.tar.gz"
default[:graphite][:carbon][:checksum] = "ba698aca" default[:graphite][:carbon][:checksum] = "ba698aca"

default[:graphite][:whisper][:version] = "0.9.7" default[:graphite][:whisper][:version] = "0.9.7"
default[:graphite][:whisper][:uri] = "http://launchpadlibrarian.net/61904764/whisper-0.9.7.tar.gz" default[:graphite][:whisper][:uri] = "http://launchpadlibrarian.net/61904764/whisper-0.9.7.tar.gz"
default[:graphite][:whisper][:checksum] = "c6272ad6" default[:graphite][:whisper][:checksum] = "c6272ad6"

default[:graphite][:graphite_web][:version] = "0.9.7c" default[:graphite][:graphite_web][:version] = "0.9.7c"
default[:graphite][:graphite_web][:uri] = "http://launchpadlibrarian.net/62379635/graphite-web-0.9.7c.tar.gz" default[:graphite][:graphite_web][:uri] = "http://launchpadlibrarian.net/62379635/graphite-web-0.9.7c.tar.gz"
default[:graphite][:graphite_web][:checksum] = "a3e16265" default[:graphite][:graphite_web][:checksum] = "a3e16265"
11 changes: 9 additions & 2 deletions recipes/carbon.rb
Expand Up @@ -17,11 +17,18 @@
cwd "/usr/src/carbon-#{node.graphite.carbon.version}" cwd "/usr/src/carbon-#{node.graphite.carbon.version}"
end end


template "/opt/graphite/conf/carbon.conf" template "/opt/graphite/conf/carbon.conf" do
variables( :line_receiver_interface => node[:graphite][:carbon][:line_receiver_interface],
:pickle_receiver_interface => node[:graphite][:carbon][:pickle_receiver_interface],
:cache_query_interface => node[:graphite][:carbon][:cache_query_interface] )
notifies :restart, "service[carbon-cache]"
end

template "/opt/graphite/conf/storage-schemas.conf" template "/opt/graphite/conf/storage-schemas.conf"


service "carbon-cache" do service "carbon-cache" do
pattern "carbon-cache" running true
start_command "/opt/graphite/bin/carbon-cache.py start" start_command "/opt/graphite/bin/carbon-cache.py start"
stop_command "/opt/graphite/bin/carbon-cache.py stop"
action :start action :start
end end
20 changes: 10 additions & 10 deletions templates/default/carbon.conf.erb
Expand Up @@ -27,13 +27,13 @@ MAX_UPDATES_PER_SECOND = 1000
# the files quickly but at the risk of slowing I/O down considerably for a while. # the files quickly but at the risk of slowing I/O down considerably for a while.
MAX_CREATES_PER_MINUTE = inf MAX_CREATES_PER_MINUTE = inf


LINE_RECEIVER_INTERFACE = 0.0.0.0 LINE_RECEIVER_INTERFACE = <%= @line_receiver_interface %>
LINE_RECEIVER_PORT = 2003 LINE_RECEIVER_PORT = 2003


PICKLE_RECEIVER_INTERFACE = 0.0.0.0 PICKLE_RECEIVER_INTERFACE = <%= @pickle_receiver_interface %>
PICKLE_RECEIVER_PORT = 2004 PICKLE_RECEIVER_PORT = 2004


CACHE_QUERY_INTERFACE = 0.0.0.0 CACHE_QUERY_INTERFACE = <%= @cache_query_interface %>
CACHE_QUERY_PORT = 7002 CACHE_QUERY_PORT = 7002


# By default, carbon-cache will log every whisper update. This can be excessive and # By default, carbon-cache will log every whisper update. This can be excessive and
Expand Down Expand Up @@ -68,12 +68,12 @@ LOG_UPDATES = True
# with the default configuration, you have to specify a distinict # with the default configuration, you have to specify a distinict
# interfaces and ports for the listeners. # interfaces and ports for the listeners.


[relay] #[relay]
LINE_RECEIVER_INTERFACE = 0.0.0.0 #LINE_RECEIVER_INTERFACE = 0.0.0.0
LINE_RECEIVER_PORT = 2003 #LINE_RECEIVER_PORT = 2003


PICKLE_RECEIVER_INTERFACE = 0.0.0.0 #PICKLE_RECEIVER_INTERFACE = 0.0.0.0
PICKLE_RECEIVER_PORT = 2004 #PICKLE_RECEIVER_PORT = 2004


CACHE_SERVERS = server1, server2, server3 #CACHE_SERVERS = server1, server2, server3
MAX_QUEUE_SIZE = 10000 #MAX_QUEUE_SIZE = 10000

0 comments on commit f1235cf

Please sign in to comment.