Visage is a web interface for viewing collectd statistics.
It also provides a JSON interface onto
collectd's RRD data,
giving you an easy way to mash up the data.
- renders graphs in the browser, and retrieves data asynchronously
- interactive graph keys, to highlight lines and toggle line visibility
- drop-down or mouse selection of timeframes (also rendered asynchronously)
- JSON interface onto
Check out a demo at http://visage.unstated.net/.
Freeze in dependencies:
$ rake deps
Amongst other things, this will pull in RubyRRDtool, which requires the rrdtool
headers to build a C extension. On Ubuntu these are in the
Config lives in several files under
profiles.yaml- groups of graphs Visage is to display
plugin-colors.yaml- colors for specific plugins/plugin instances
fallback-colors.yaml- ordered list of fallback colors
init.rd- bootstrapping code, specifies collectd's RRD directory
profiles.yaml isn't setup by default, but you can copy
across and edit to taste. The plugins are in the format of
plugins-instance being optional.
If you don't specify a
plugin-instance Visage will attempt to graph all plugin
instances under the specified
cpu-0 will display
cpu-nice, etc, whereas
cpu-0/cpu-wait will only show
cpu-wait. You can even choose a specific basket (and only those) of plugin
instances to graph, with something like
It should be pretty easy to deduce the config format from the existing file (it's simple nested key-value data).
Make sure collectd's RRD directory is readable by whatever user the web server
is running as. You can specify where collectd's rrd directory is in
$ gem install shotgun $ shotgun visage.rb
With Passenger, create an Apache vhost with the
DocumentRoot set to the
public/ directory of where you have deployed the checked out code, e.g.
<VirtualHost *> ServerName visage.example.org ServerAdmin email@example.com DocumentRoot /srv/www/visage.example.org/root/public/ <Directory "/srv/www/visage.example.org/root/public/"> Options FollowSymLinks Indexes AllowOverride None Order allow,deny Allow from all </Directory> ErrorLog /srv/www/visage.example.org/log/apache_errors_log CustomLog /srv/www/visage.example.org/log/apache_app_log combined </VirtualHost>
This assumes you have a checkout of the code at
If you don't want to use Apache + Passenger, you can install the
mongrel gems and run up a web server yourself.
Ubuntu users looking for Passenger packages should add John Ferlito's mod-passenger PPA to their apt sources.
Run all cucumber features:
$ rake cucumber
$ bin/cucumber --require features/ features/something.feature
- create proper mootools class - DONE
- switch to g.raphael - DONE
- config file - DONE
- data profiles - DONE
- handle single plugin instance in graphing code - DONE
- specify data url in graphing code - DONE
- generate holders for graph/labels/time selector - DONE
- clean up routes - DONE
- smart colour selection (CPU-1 = CPU) - DONE
- title attributes - DONE
- split profiles + colors => plugins into separate files - DONE
- fix key labels - DONE
- axis labels (with human readable times)
- detailed point-in-time data on hover
- embedded html generator - DONE
- zoom + dynamic resize - DONE
- combine graphs from different hosts
- comment on time periods
- view list of comments
- provide option to shade under graphs - DONE