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
collectd
RRDs
Check out [http://visage.unstated.net/nadia/cpu+load] (a demo).
Ruby (install with gem install <dep>
:
- bundler08
Please note Visage uses bundler08
not bundler
. Current bundler
releases depend on a version of RubyGems that is not packaged on any recent
stable Linux distribution.
System (install with your system's package manager):
- git, librrd-dev, ruby, rubygems, librrd-ruby
Check out the code from GitHub:
$ git clone git://github.com/auxesis/visage.git
Bundle dependencies:
$ gem bundle
Amongst other things, this will pull in Errand, which requires the rrdtool
headers to build a C extension. On Debian/Ubuntu these are in the librrd2-dev
package, and on RHEL/CentOS rrdtool-devel
.
Config lives in several files under config/
.
profiles.yaml
- groups of graphs Visage is to displayplugin-colors.yaml
- colors for specific plugins/plugin instancesfallback-colors.yaml
- ordered list of fallback colorsinit.rb
- bootstrapping code, specifies collectd's RRD directory
profiles.yaml
isn't setup by default, but you can copy profiles.yaml.sample
across and edit to taste. The plugins are in the format of
plugin/plugin-instance
, with plugins-instance
being optional.
If you don't specify a plugin-instance
Visage will attempt to graph all plugin
instances under the specified plugin
, e.g. cpu-0
will display cpu-idle
,
cpu-interrupt
, cpu-nice
, etc, whereas cpu-0/cpu-wait
will only show
cpu-wait
. You can also choose a specific group of plugin instances to graph,
with something like cpu-0/cpu-system/cpu-user/cpu-wait
.
It should be pretty easy to deduce the config format from the existing file (it's simple nested key-value data).
all the config/*-profiles.yaml are automatically glob-ed in. You can easily do a per host profiles file this way.
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 init.rb
,
with the c['rrddir']
key.
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 contact@visage.example.org
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 /srv/www/visage.example.org/root
.
If you don't want to use Apache + Passenger, you can install the thin
or
mongrel
gems and run up a web server yourself.
Example of config/groups.yaml : --- infra: fluor magnesium
services:
uranium
azote
Example of config/sets.yaml : --- databases: graphs: - mysqlnode1: - cpu-0 - mysqlnode2: - cpu-0 - mysqlpra: - cpu-0 www-related: graphs: - carbone: - interface - fluor: - interface - magnesium: - interface - mazerati: - interface - nginx