Skip to content

Instantly share code, notes, and snippets.

@vvuksan
Created October 26, 2010 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vvuksan/646149 to your computer and use it in GitHub Desktop.
Save vvuksan/646149 to your computer and use it in GitHub Desktop.
Graphite Installation
--- webapp/graphite/storage.py 2009-12-07 05:58:32 +0000
+++ webapp/graphite/storage.py 2010-10-14 16:36:07 +0000
@@ -262,7 +262,8 @@
def getDataSources(self):
try:
info = rrdtool.info(self.fs_path)
- return [RRDDataSource(self, source) for source in info['ds']]
+ #return [RRDDataSource(self, source) for source in info['ds']]
+ return [RRDDataSource(self, source) for source in ["sum"]]
except:
raise
return []
@@ -274,6 +275,7 @@
self.name = name
self.fs_path = rrd_file.fs_path
self.metric_path = rrd_file.metric_path + '.' + name
+ self.real_metric = str(self.metric_path)
def fetch(self, startTime, endTime):
startString = time.strftime("%H:%M_%Y%m%d", time.localtime(startTime))
You will need to do adapt this Puppet script to your OS.
class ganglia {
package {
[ ganglia-gmond, ganglia-gmond-modules-python, ganglia-gmetad]: ensure => latest;
}
service {
gmond:
ensure => running,
enable => true;
gmetad:
ensure => running,
enable => true;
}
}
class graphite {
package {
[ python-django, python-simplejson, mod_python, python-memcached, python-sqlite2, rrdtool-python]: ensure => latest;
}
}
class apache {
package {
httpd: ensure => latest;
php: ensure => latest;
php-gd: ensure => latest;
}
service {
httpd:
ensure => running,
enable => true;
}
}
include ganglia
include apache
include graphite
# Download graphite from graphite.wikidot.org. Patch with the patch below. Install whisper and webapp. No need for carbon
#
# If you are on RHEL/Centos do
# find . | grep amqp | xargs rm -fv
#
# cp ./examples/example-graphite-vhost.conf /etc/httpd/conf.d/graphite.conf
# cd /opt/graphite/webapp/graphite; python manage.py syncdb
# chown -R apache:apache /opt/graphite/storage
# chmod -R g+w /opt/graphite/storage
Download the Ganglia Web UI rewrite from
http://github.com/vvuksan/ganglia-misc/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment