Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

improve sub URI deployment / docs / other tweaks #64

Open
wants to merge 499 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
499 commits
Select commit Hold shift + click to select a range
9205632
updated ignore list
Jun 24, 2010
9d27bda
updated ignore list
Jun 24, 2010
af2d755
removed unused log directory
Jun 24, 2010
c953e1c
removed unused log directory
Jun 24, 2010
2b6c40e
renamed app file to visage-app so it doesn't conflict with the other …
Jun 24, 2010
3615caa
renamed app file to visage-app so it doesn't conflict with the other …
Jun 24, 2010
ba91188
require renamed app file
Jun 24, 2010
5440411
require renamed app file
Jun 24, 2010
401da34
updated homepage location
Jun 24, 2010
8749f6a
updated homepage location
Jun 24, 2010
bb701bf
added command for generating an apache vhost
Jun 24, 2010
b289363
added command for generating an apache vhost
Jun 24, 2010
e3b5457
moved config.ru into lib/
Jun 24, 2010
3851420
moved config.ru into lib/
Jun 24, 2010
25d2c02
fix path typo
Jun 24, 2010
375e8f2
fix path typo
Jun 24, 2010
e15f08b
fixed load path of app file
Jun 24, 2010
0b04cbb
fixed load path of app file
Jun 24, 2010
5548057
added genapache documentation for generating an apache vhost for the …
Jun 24, 2010
00ac3a8
added genapache documentation for generating an apache vhost for the …
Jun 24, 2010
6b6d9d9
bumped version
Jun 24, 2010
584ed85
bumped version
Jun 24, 2010
5cd1b1b
updated copy
Jun 24, 2010
055d406
updated copy
Jun 24, 2010
5db3246
fixed gem name
Jun 24, 2010
fd39dca
fixed gem name
Jun 24, 2010
db8e98f
Version bump to 0.1.6
Jun 24, 2010
c639a69
Version bump to 0.1.6
Jun 24, 2010
7b56f10
added an image of an example graph
Jun 24, 2010
ffcbdc0
added an image of an example graph
Jun 24, 2010
0915734
removed unused page
Jun 25, 2010
7f643e5
removed unused page
Jun 25, 2010
14fe8e5
made path references under lib/
Jun 25, 2010
ac41f7e
made path references under lib/
Jun 25, 2010
f76035d
use link_to helper to handle serving visage with a custom RackBaseURI…
Jun 25, 2010
6611065
use link_to helper to handle serving visage with a custom RackBaseURI…
Jun 25, 2010
4aedc0a
added helper for generating links with RackBaseURI in mind
Jun 25, 2010
2d850f5
added helper for generating links with RackBaseURI in mind
Jun 25, 2010
677d933
fix path for generated visage vhost
Jun 25, 2010
ee16f25
fix path for generated visage vhost
Jun 25, 2010
4dae38b
require yaml explicitly
Jun 25, 2010
7c22215
require yaml explicitly
Jun 25, 2010
d506160
append gem root to load path, so internal requires later on work
Jun 25, 2010
da4857c
append gem root to load path, so internal requires later on work
Jun 25, 2010
c123f4e
Version bump to 0.1.7
Jun 25, 2010
7ce625a
Version bump to 0.1.7
Jun 25, 2010
e7bcbc9
Provide a fallback colour if the instance is nil. Set the last value …
Jun 25, 2010
e7af06b
Provide a fallback colour if the instance is nil. Set the last value …
Jun 25, 2010
40bf255
explicitly require pathname, so shotgun works
Jun 25, 2010
7846251
explicitly require pathname, so shotgun works
Jun 25, 2010
6afc865
fixed trailing whitespace, added swap_io-{in,out} colors
Jun 25, 2010
3c31557
fixed trailing whitespace, added swap_io-{in,out} colors
Jun 25, 2010
c9b9819
Version bump to 0.1.8
Jun 25, 2010
545a239
Version bump to 0.1.8
Jun 25, 2010
31bfa38
added task to push the latest gem built
Jun 25, 2010
42ef5ad
added task to push the latest gem built
Jun 25, 2010
a63ea5a
removed profiles.yaml - this is specific to each install
Jun 27, 2010
3a0ba62
merged from ui2 branch
Jun 27, 2010
ce4a4ff
removed duplicated patches file
Jun 27, 2010
57ae5e9
moved collectd directory structure helper under correct namespace
Jun 27, 2010
eaf2dd1
moved collectd directory structure helper under correct namespace
Jun 27, 2010
902c30a
removed crufty __DIR__ references in favour of pathname
Jun 27, 2010
5c5ff06
require patches under new directory structure
Jun 27, 2010
864b31e
use link_to helper to correctly generate sub URI path-aware links
Jun 27, 2010
80c023f
use newly namespaced collectd rrd finder/helper
Jun 27, 2010
b506610
removed extraneous template definition
Jun 27, 2010
9bfc804
correctly link up resources so they are sub uri aware
Jun 27, 2010
948ffe2
mix in resource linking helper
Jun 27, 2010
84b620f
removed unnecessary requires
Jun 27, 2010
5752e0a
added fixme for single host bug
Jun 27, 2010
c497597
temporarily set the sinatra application to Visage::JSON
Jun 27, 2010
753b4b9
generalise tests to work on all hosts. added scenario for getting a l…
Jun 27, 2010
adf3ab2
added route for returning a list of all hosts
Jun 27, 2010
999d668
expose all webrat rack adapter methods
Jun 27, 2010
364eeb7
added scenario for retreiving a list of plugins + instances belonging…
Jun 27, 2010
6c9d173
optionally provide a host to return a list of metrics for
Jun 27, 2010
f67b8c8
added route for returning a list of plugins belonging to a host
Jun 27, 2010
58e924a
knocked off todo
Jun 27, 2010
e216216
added comments on what the bootup process is doing. cleaned up the bo…
Jun 27, 2010
618d5a0
added link to profile builder on profile listing page
Jun 27, 2010
db0d4dc
use shorthand for loading up yaml from file
Jun 27, 2010
434c7d8
removed profiles.yaml from index, as it's site specific
Jun 27, 2010
3fd8394
redirect / to /profiles
Jun 27, 2010
4189853
added scenario for viewing created profiles
Jun 27, 2010
4b260d4
removed profiles.yaml from index, as it's site specific
Jun 27, 2010
d63b357
added method to expose graphs generated from a profile
Jun 27, 2010
417d644
added code to generate javascript graph on profile page
Jun 27, 2010
7db13b7
added class to represent a graph
Jun 27, 2010
2567d6e
explicitly require haml so app is thread-safe
Jun 27, 2010
7fb6946
fixed host + metric selection logic
Jun 27, 2010
346c0d5
removed profiles.yaml from index, as it's site specific
Jun 27, 2010
bb95ea4
Added page title helper, for bubbling up the page title from the HAML…
Jun 27, 2010
583a9f3
made nav links bold, set background color on nav links
Jun 27, 2010
896d37a
added placeholder text
Jun 27, 2010
5287582
merged from integration
Jun 27, 2010
9f2ee98
fixed visage binary to start rack from instance rather than singleton
Jun 27, 2010
ea95394
Version bump to 0.2.0
Jun 27, 2010
71c545b
reworked copy, removed old docs, added deploy instructions for apache…
Jun 27, 2010
1c65d5d
Output the URL that Visage will be running at. ASCII art FTW
Jun 27, 2010
bca76f9
Version bump to 0.2.1
Jun 27, 2010
17e483c
removed trailing whitespace, removed debugging statements so firefox …
auxesis Jul 6, 2010
94ceeaa
Version bump to 0.2.2
auxesis Jul 6, 2010
9bcbea9
removed commented out console.log
auxesis Jul 6, 2010
c26b015
added lintian task for verifying console.logs don't sneak into releases
auxesis Jul 6, 2010
8f350bf
Start and finish timestamps can be specified in an URL.
Lastpixl Jul 14, 2010
6b5ffad
Adding name as author.
Lastpixl Jul 14, 2010
d696ff0
whitespace changes
auxesis Jul 14, 2010
2b0d25e
added authors list
auxesis Jul 14, 2010
d075627
moved Xavier's name into the newly created AUTHORS file
auxesis Jul 14, 2010
6fa8341
Version bump to 0.2.3
auxesis Jul 14, 2010
e198e3e
Remove debug (Firebug?) leftovers.
Lastpixl Jul 16, 2010
8f76e2b
Remove a bug when specifying a timeframe.
Lastpixl Jul 16, 2010
c1d3784
Delete last value (which is always weird) instead of replacing it wit…
Lastpixl Jul 16, 2010
dd5e251
Sanitize user input.
Lastpixl Jul 16, 2010
73995d0
Version bump to 0.2.4
auxesis Jul 19, 2010
d1974dc
de-duped setting of @rrddir across various collectd helper classes
auxesis Aug 9, 2010
79e7331
attempt to choose safer plugins when testing
auxesis Aug 9, 2010
fa506ef
renamed file
auxesis Aug 9, 2010
557c577
added scenario to verify visage tells the user where it's looking for…
auxesis Aug 10, 2010
860e3b9
make the pipe persist across steps, added step to verify string exist…
auxesis Aug 10, 2010
d4786ee
output where Visage is looking for rrds. make output synchronous, so …
auxesis Aug 10, 2010
2957ea6
Version bump to 0.2.5
auxesis Aug 10, 2010
027dfe7
added description to lintian task. added task to clean out various ge…
auxesis Aug 15, 2010
26ce790
added people who have given inspiration to the project
auxesis Aug 16, 2010
9a62191
updated .gitignore to ignore _site/ generated by jekyll
auxesis Aug 19, 2010
84f41bc
fixed error in package name
auxesis Aug 19, 2010
48a88ec
removed sample config, as it's deprecated
auxesis Sep 26, 2010
e7f27ec
removed deprecated code
auxesis Sep 26, 2010
a3548bd
refactored and expanded sceranios
auxesis Sep 26, 2010
258090e
use Rack::Builder to construct the visage app for testing
auxesis Sep 26, 2010
e51d5d7
added step for testing a list of profiles exists
auxesis Sep 26, 2010
843b264
check that the profile is sorted alphabetically
auxesis Sep 26, 2010
141cd7e
filled out steps
auxesis Sep 26, 2010
692732f
pass in sort paramater when searching
auxesis Sep 26, 2010
24f4f47
sort the profiles before returning them
auxesis Sep 26, 2010
86db24e
added subtle styling for sort box
auxesis Sep 26, 2010
6485eb5
added sort box
auxesis Sep 26, 2010
4fa8f83
boot Sinatra::Application after loading the middleware, otherwise tes…
auxesis Sep 26, 2010
0e85186
Version bump to 0.2.6
auxesis Sep 26, 2010
a93da11
refactor port out into a variable. use webrick as the server to work …
auxesis Sep 26, 2010
544ba70
Version bump to 0.2.7
auxesis Sep 26, 2010
43e2abf
removed unused js
auxesis Sep 26, 2010
f6be371
removed newline
auxesis Oct 14, 2010
088968c
refactored configuration parsing to handle passing variables to set u…
auxesis Oct 15, 2010
dc04941
normalised colors file
auxesis Oct 15, 2010
120d534
fixed variable naming, removed deprecated code, fixed indentation
auxesis Oct 15, 2010
b917928
updated ignore list
auxesis Oct 15, 2010
694e805
refactor to make tests pass
auxesis Oct 15, 2010
40d2da3
renamed scenario, removed debugging step
auxesis Oct 15, 2010
b7f5023
added todo
auxesis Oct 15, 2010
74d6683
handle profiles that return no graphs
auxesis Oct 15, 2010
ff891c9
added basic cucumber feature for the builder section of visage
auxesis Oct 15, 2010
80df8e5
added navigation link back to profiles list
auxesis Oct 15, 2010
565a7bf
minor visual adjustments. mainly made colours more bold
auxesis Oct 15, 2010
3832206
Version bump to 0.3.0
auxesis Oct 15, 2010
de1a596
added highcharts
auxesis Oct 17, 2010
de5fa06
removed raphael
auxesis Oct 17, 2010
b6afe82
removed raphael includes
auxesis Oct 17, 2010
100da29
move js loading around
auxesis Oct 17, 2010
b0aa255
removed unneeded options
auxesis Oct 17, 2010
cb803a8
refactored to use highcharts, and clean up the js in general
auxesis Oct 17, 2010
023a1d3
removed coloring support, as it's handled entirely by highcharts
auxesis Oct 17, 2010
4534b28
set the last value as zero, so the timescale isn't off
auxesis Oct 17, 2010
0f1899e
replicate (most of) the functionality of the raphael graphs
auxesis Oct 17, 2010
33e15c5
removed the highcharts like
auxesis Oct 17, 2010
923d19b
attempt to put the time period selection in place
auxesis Oct 17, 2010
f950f36
make highcharts use the data as real time series data. cast appropria…
auxesis Oct 17, 2010
5749bde
try to normalise the data slightly more sanely
auxesis Oct 17, 2010
03c63d5
added ability for the graph to live-update. hammered out a bunch of p…
auxesis Oct 17, 2010
8580759
removed debugging statement
auxesis Oct 17, 2010
48ac142
round values where approprirate
auxesis Oct 17, 2010
bcb2702
moved TODOs into github issues. updated configuration documentation
auxesis Oct 18, 2010
4621dc6
patch version bump
auxesis Oct 18, 2010
086aeb0
added man pages
auxesis Oct 18, 2010
ae74a2d
Version bump to 0.3.2
auxesis Oct 18, 2010
7541184
renamed everything to visage-app
auxesis Oct 18, 2010
734d4ac
renamed everything to visage-app
auxesis Oct 18, 2010
a3163d9
cleaned up rakefile
auxesis Oct 18, 2010
2097aa9
Version bump to 0.3.3
auxesis Oct 18, 2010
b5778d0
merged from master
auxesis Oct 18, 2010
a0a7637
moved all resources to visage-app
auxesis Oct 18, 2010
0a36608
added formatters for tail + apache plugins. try to handle ridiculousl…
auxesis Oct 18, 2010
6ce1abe
fixed indentation. customised the legend item styling
auxesis Oct 18, 2010
5b3173b
minor visual improvements in the navigation
auxesis Oct 18, 2010
b95922a
added space
auxesis Oct 18, 2010
97d9272
load the config per request
auxesis Oct 18, 2010
e7f1a94
provide fallback hash if there's no config
auxesis Oct 18, 2010
e8b5db1
upgraded mootools-more
auxesis Oct 18, 2010
9120792
added a range of keyboard shortcuts
auxesis Oct 18, 2010
28548f1
provide keyboard shortcuts cheat sheet
auxesis Oct 18, 2010
1549b65
make sure the footer is always at the bottom of the page
auxesis Oct 18, 2010
753e573
scroll nicely if the element isn't visible
auxesis Oct 30, 2010
8632b31
make styling consistent with website
auxesis Oct 30, 2010
4f40666
make markup consistent with website
auxesis Oct 30, 2010
afda644
added link to the raw JSON data
auxesis Oct 30, 2010
85514d2
remove single letter variables
auxesis Oct 30, 2010
376e840
bumped mootools-more
auxesis Oct 30, 2010
fd537c4
include missing plugins
auxesis Oct 30, 2010
1cd935d
set the decimal place on the axis label based on the maximum value wi…
auxesis Oct 30, 2010
5fc91f5
set the decimal place on the axis label based on the maximum value wi…
auxesis Oct 30, 2010
ea9b206
added licensing section to docs
auxesis Oct 30, 2010
075f561
added explicit license file
auxesis Oct 30, 2010
768b8f6
removed commented out code
auxesis Oct 30, 2010
a37137e
build a prerelease gem off highcharts branch
auxesis Nov 5, 2010
81ff319
Disable keyboard shortcuts in input and textarea
johnf Nov 14, 2010
cc879fd
Call load as a class method
johnf Nov 14, 2010
3f10ad6
Another small fix for sub path mounting
johnf Nov 14, 2010
007377d
More javascript errors
johnf Nov 15, 2010
bc41372
add build-essential to list of deps on Ubuntu
auxesis Jan 15, 2011
bf6b2e0
Merge branch 'highcharts'
auxesis Jan 15, 2011
595c0dd
Bumped pre-release version number
auxesis Jan 15, 2011
87d3c30
Added gemspec to apease jeweler
auxesis Jan 15, 2011
1afecd8
Regenerated gemspec for version 0.9.0.pre2
auxesis Jan 15, 2011
3a90832
Initial sanitisation of data points, so the graph renders labels corr…
auxesis Jan 24, 2011
58fdbcc
Clarified licensing.
auxesis Jan 24, 2011
1cd057c
Optimize graph label generation.
bzed Jan 24, 2011
e06a170
Merge https://github.com/bzed/visage into bzed-visage
auxesis Jan 24, 2011
0a6bbff
Added formatter for the curl_json plugin
auxesis Jan 25, 2011
ce1c2fa
Don't specify a name. Cleaned up parameter passing.
auxesis Jan 25, 2011
e470905
Cleaned up option passing. Added function to format the plugin name.
auxesis Jan 25, 2011
a9351cb
Cleaned whitespace
auxesis Jan 25, 2011
d9f6e41
Merge branch 'xylabels' into labels
auxesis Jan 25, 2011
17ba4da
Reduced verbosity of the code when building up the data structure
auxesis Jan 25, 2011
0ab981b
Renamed variables for clarity.
auxesis Jan 25, 2011
31a2c6a
Bring the 0.9.0 series out of beta
auxesis Jan 25, 2011
6121e9a
Regenerated gemspec for version 0.9.0
auxesis Jan 25, 2011
71820d2
Updated development instructions to be based around Bundler.
auxesis Jan 25, 2011
e5ae56f
Added gemfile
auxesis Jan 25, 2011
58855ec
Fixed RRDtool package name for yum based distros.
auxesis Feb 2, 2011
f364001
Regenerated gemspec for version 0.9.0
auxesis Feb 4, 2011
982dbfc
Escape all data being turned into HTML. Fixes #29
auxesis Feb 15, 2011
3d1ecbf
Version bump to 0.9.1
auxesis Feb 15, 2011
b0aa329
Regenerate gemspec for version 0.9.1
auxesis Feb 15, 2011
33165ab
Merge remote branch 'origin'
auxesis Feb 15, 2011
6aa0e98
Fixed syntax of variable assignment. Removed unused option to visageG…
auxesis Feb 15, 2011
e40f242
Version bump to 0.9.2
auxesis Feb 15, 2011
3028465
Regenerate gemspec for version 0.9.2
auxesis Feb 15, 2011
b795f8b
Version bump to 0.9.3
auxesis Mar 2, 2011
8488bd6
Updated dependencies
auxesis Mar 2, 2011
4118266
Regenerate gemspec for version 0.9.3
auxesis Mar 2, 2011
6573961
Further dependency version bumps
auxesis Mar 2, 2011
46256c0
Regenerate gemspec for version 0.9.3
auxesis Mar 2, 2011
199645e
Version bump to 0.9.4
auxesis Mar 2, 2011
a08e16b
Regenerate gemspec for version 0.9.4
auxesis Mar 2, 2011
2357556
Specify gem needed for errand to work with ruby enterprise edition.
sciurus Mar 18, 2011
7be2495
add link_to so deployment in a sub URI works
Apr 25, 2011
7ae3e5d
whitespace tweaks
Apr 25, 2011
0adb430
create options structure before instantiating chart
Apr 25, 2011
e91ca9a
tweak chart options
Apr 25, 2011
ca9603a
improve Passenger / sub URI documentation
Apr 26, 2011
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
config/profiles.yaml
.DS_Store
log/*
tmp/*
pkg/*
*~
.#*
webrat*
.bundle/
vendor/gems/*
visage-app.gemspec
lib/visage-app/config/profiles.yaml
_site
features/data/config/*/*.yaml
14 changes: 14 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Visage was written by
=====================
Lindsay Holmwood <[email protected]>

Contributors include
--------------------
Jeffrey Lim <[email protected]>
Andrew Harvey <[email protected]>
Xavier Mehrenberger <[email protected]>

Inspiration given by
--------------------
Gareth Stokes
Asdrubal Ibarra
16 changes: 14 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
source :gemcutter
#!/usr/bin/env ruby

source :rubygems

gem "sinatra"
gem "haml"
gem "tilt"
gem "sinatra"
gem "errand"
gem "yajl-ruby"

group :development do
gem "shotgun"
gem "rack-test"
gem "rspec"
gem "cucumber"
gem "webrat"
gem "jeweler"
end
33 changes: 0 additions & 33 deletions Gemfile.lock

This file was deleted.

27 changes: 27 additions & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2009-2010 Lindsay Holmwood

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Visage is distributed with Highcharts. Torstein Hønsi has kindly granted
permission to distribute Highcharts under the GPLv2 as part of Visage.

If you ever need an excellent JavaScript charting library, please consider
purchasing a [commercial license](http://highcharts.com/license) for
Highcharts.

227 changes: 142 additions & 85 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Visage

Visage is a web interface for viewing [collectd](http://collectd.org) statistics.

It also provides a [JSON](http://json.org) interface onto `collectd`'s RRD data,
It also provides a [JSON](http://json.org) interface onto `collectd`'s RRD data,
giving you an easy way to mash up the data.

Features
Expand All @@ -14,120 +14,177 @@ Features
* drop-down or mouse selection of timeframes (also rendered asynchronously)
* JSON interface onto `collectd` RRDs

Check out a demo at [http://visage.unstated.net/](http://visage.unstated.net).
Here, have a graph:


![Something I prepared earlier.](http://farm2.static.flickr.com/1020/4730994504_c8c6fc9c18_z.jpg)


Or check out [a live demo](http://visage.unstated.net/nadia/cpu+load).

Installing
----------

Bundle dependencies:
N.B: Visage must be deployed on a machine where `collectd` stores its stats in RRD.

$ bundle install vendor/gems/
On Ubuntu, to install dependencies run:

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`.
$ sudo apt-get install -y build-essential librrd-ruby ruby ruby-dev rubygems collectd

Configuring
-----------
On CentOS, to install dependencies run:

Config lives in several files under `config/`.
$ sudo yum install -y ruby-RRDtool ruby rubygems collectd

* `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.rb` - bootstrapping code, specifies collectd's RRD directory
If you are using Ruby Enterprise Edition, instead of installing librrd-ruby or ruby-RRDtool, run

`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.
$ gem install librrd

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`.
Then install the app with:

It should be pretty easy to deduce the config format from the existing file
(it's simple nested key-value data).
$ gem install visage-app

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.
Running
-------

Developing
----------
You can try out Visage quickly with:

For development:
$ visage-app start

$ gem install shotgun
$ shotgun visage.rb
Then paste the URL from the output into your browser.

If you get a `command not found` when running the above command (RubyGems likely
isn't on your PATH), try this instead:

$ $(dirname $(dirname $(gem which visage-app)))/bin/visage-app start

Deploying
---------

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.
Visage can be deployed on Apache with Passenger:

$ sudo apt-get install libapache2-mod-passenger

Visage can attempt to generate an Apache vhost config for use with Passenger:

$ visage-app genapache
<VirtualHost *>
ServerName visage.example.org
ServerAdmin [email protected]
DocumentRoot /srv/www/visage.example.org/root/public/
<Directory "/srv/www/visage.example.org/root/public/">
ServerName ubuntu.localdomain
ServerAdmin [email protected]

DocumentRoot /home/user/.gem/ruby/1.8/gems/visage-app-0.1.0/lib/visage-app/public

<Directory "/home/user/.gem/ruby/1.8/gems/visage-app-0.1.0/lib/visage-app/public">
Options FollowSymLinks Indexes
AllowOverride None
Order allow,deny
Allow from all
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`.
Copypasta this into your system's Apache config structure and tune to taste.

If you don't want to use Apache + Passenger, you can install the `thin` or
`mongrel` gems and run up a web server yourself.
To do this on Debian/Ubuntu:

Ubuntu users looking for Passenger packages should add John Ferlito's
[mod-passenger PPA](https://launchpad.net/~johnf-inodes/+archive/mod-passenger)
to their apt sources.
$ sudo -s
$ visage-app genapache > /etc/apache2/sites-enabled/visage
$ a2dissite default
$ service apache2 reload

Testing
-------
Then head to your Apache instance and Visage will be up and running.

Configuring
-----------

Visage looks for two environment variables when starting up:

* `CONFIG_PATH`, an entry on the configuration file search path
* `RRDDIR`, the location of collectd's RRDs

Visage has a configuration search path which can be used for overriding
individual files. By default it has one entry: `$VISAGE_ROOT/lib/visage/config/`.
You can set the `CONFIG_PATH` environment variable to add another directory to
the config load path. This directory will be searched when loading up
configuration files.

CONFIG_PATH=/var/local/visage-app start

This is especially useful when you want to deploy + run Visage from an installed
gem with Passenger. e.g.

<VirtualHost *:80>
ServerName monitoring.example.org
ServerAdmin [email protected]

SetEnv CONFIG_PATH /var/local/visage
SetEnv RRDDIR /opt/collectd/var/lib/collectd

DocumentRoot /var/lib/gems/1.8/gems/visage-app-0.3.0/lib/visage/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog /var/log/apache2/access.log common
</VirtualHost>

If you are deploying to a sub URI, simply create a link to the visage-app public
directory from within your document root:

ln -s /var/lib/gems/1.8/gems/visage-app-0.9.4/lib/visage-app/public visage

Then set the RackBaseURI, but otherwise configuration is similar:

RackBaseURI /visage

SetEnv CONFIG_PATH /var/local/visage

<Directory /var/lib/gems/1.8/gems/visage-app-0.9.4/lib/visage-app/public>
Options FollowSymLinks Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Also to keep in mind when deploying with Passenger, the `CONFIG_PATH` directory
and its files need to have the correct ownership. Passenger defaults to running
apps as the user they are owned by, or runs them as nobody if they are owned by
root (you can change with PassengerDefaultUser):

chown nobody:nogroup -R /var/local/visage

Developing + testing
--------------------

Check out the code with:

$ git clone git://github.com/auxesis/visage.git

Install the development dependencies with:

$ gem install bundler
$ bundle install

Run all cucumber features:

$ rake cucumber

And run the app with:

$ shotgun lib/visage-app/config.ru

To create and install a new gem from the current source tree:

$ rake install

Licencing
---------

Visage is MIT licensed.

Visage is distributed with Highcharts. Torstein Hønsi has kindly granted
permission to distribute Highcharts under the GPLv2 as part of Visage.

Run all cucumber features:

$ rake cucumber

Specific features:

$ bin/cucumber --require features/ features/something.feature

TODO
----

* 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) - DONE
* 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
* interface to build custom graph profiles
If you ever need an excellent JavaScript charting library, please consider
purchasing a [commercial license](http://highcharts.com/license) for
Highcharts.
Loading