Permalink
Browse files

integrate ganglia and graphite

  • Loading branch information...
1 parent ea5aed0 commit 0a1e1e41632556e336795243576deddf7857a4f6 @dje dje committed Mar 2, 2011
Showing with 33 additions and 2 deletions.
  1. +5 −2 metadata.json
  2. +1 −0 metadata.rb
  3. +15 −0 recipes/ganglia.rb
  4. +12 −0 recipes/web.rb
View
7 metadata.json
@@ -1,7 +1,7 @@
{
"name": "graphite",
"description": "Installs/Configures graphite",
- "long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES:\n\n= USAGE:\n\n= CAVEATS:\n\nI didn't see an easy way to set Graphite's credentials easily.\nI set those to root/root with an email address going no where.\n",
+ "long_description": "= DESCRIPTION:\n\nInstalls and configures Graphite http://graphite.wikidot.com/\n\n= REQUIREMENTS:\n\nUbuntu 10.04 (Lucid)\n\n= ATTRIBUTES:\n\n= USAGE:\n\n= CAVEATS:\n\nI didn't see an easy way to set Graphite's credentials easily.\nI set those to root/root with an email address going no where.\n\nShips with two default schemas, stats.* (for Etsy's statsd) and a\ncatchall that matches anything. The catchall retains minutely data for\n13 months, as in the default config. stats retains data every 10 seconds\nfor 6 hours, every minute for a week, and every 10 minutes for 5 years.\n",
"maintainer": "Heavy Water Software Inc.",
"maintainer_email": "darrin@heavywater.ca",
"license": "Apache 2.0",
@@ -16,6 +16,9 @@
],
"apache2": [
+ ],
+ "ganglia": [
+
]
},
"recommendations": {
@@ -34,5 +37,5 @@
},
"recipes": {
},
- "version": "0.0.1"
+ "version": "0.0.2"
}
View
1 metadata.rb
@@ -7,4 +7,5 @@
depends "python"
depends "apache2"
+depends "ganglia"
supports "ubuntu"
View
15 recipes/ganglia.rb
@@ -0,0 +1,15 @@
+include_recipe "graphite"
+include_recipe "ganglia::gmetad"
+
+target = "/opt/graphite/storage/rrd/#{node.ganglia.cluster_name}"
+
+directory target do
+ mode "755"
+end
+
+Dir.glob("/var/lib/ganglia/rrds/#{node.ganglia.cluster_name}/*.*").each do |path|
+ source = File.basename(path).gsub(".", "_")
+ link "#{target}/#{source}" do
+ to path
+ end
+end
View
12 recipes/web.rb
@@ -3,6 +3,7 @@
package "python-cairo-dev"
package "python-django"
package "python-memcache"
+package "python-rrdtool"
remote_file "/usr/src/graphite-web-#{node.graphite.graphite_web.version}.tar.gz" do
source node.graphite.graphite_web.uri
@@ -15,6 +16,17 @@
cwd "/usr/src"
end
+remote_file "/usr/src/graphite-web-#{node.graphite.graphite_web.version}/webapp/graphite/storage.py.patch" do
+ source "http://launchpadlibrarian.net/65094495/storage.py.patch"
+ checksum "8bf57821"
+end
+
+execute "patch graphite-web" do
+ command "patch storage.py storage.py.patch"
+ creates "/opt/graphite/webapp/graphite_web-#{node.graphite.graphite_web.version}-py2.6.egg-info"
+ cwd "/usr/src/graphite-web-#{node.graphite.graphite_web.version}/webapp/graphite"
+end
+
execute "install graphite-web" do
command "python setup.py install"
creates "/opt/graphite/webapp/graphite_web-#{node.graphite.graphite_web.version}-py2.6.egg-info"

0 comments on commit 0a1e1e4

Please sign in to comment.