visage-app 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +36 -31
  2. data/VERSION +1 -1
  3. data/bin/visage +14 -0
  4. metadata +2 -2
data/README.md CHANGED
@@ -25,56 +25,41 @@ Or check out [a live demo](http://visage.unstated.net/nadia/cpu+load).
25
25
  Installing
26
26
  ----------
27
27
 
28
+ N.B: Visage must be deployed on a machine where `collectd` stores its stats in RRD.
29
+
28
30
  On Ubuntu, to install dependencies run:
29
31
 
30
- $ sudo apt-get install -y librrd-ruby ruby rubygems
32
+ $ sudo apt-get install -y librrd-ruby ruby ruby-dev rubygems collectd
31
33
 
32
34
  On CentOS, to install dependencies run:
33
35
 
34
- $ sudo yum install -y rrdtool ruby rubygems
36
+ $ sudo yum install -y rrdtool ruby rubygems collectd
35
37
 
36
38
  Then install the app with:
37
39
 
38
40
  $ gem install visage-app
39
41
 
40
-
41
42
  Running
42
43
  -------
43
44
 
44
- You can try out the application quickly with:
45
+ You can try out Visage quickly with:
45
46
 
46
47
  $ visage start
47
48
 
48
- Configuring
49
- -----------
50
-
51
- Config lives in several files under `config/`.
52
-
53
- * `profiles.yaml` - groups of graphs Visage is to display
54
- * `plugin-colors.yaml` - colors for specific plugins/plugin instances
55
- * `fallback-colors.yaml` - ordered list of fallback colors
56
- * `init.rb` - bootstrapping code, specifies collectd's RRD directory
57
-
58
- `profiles.yaml` isn't setup by default, but you can copy `profiles.yaml.sample`
59
- across and edit to taste. The plugins are in the format of
60
- `plugin/plugin-instance`, with `plugins-instance` being optional.
49
+ Then paste the URL from the output into your browser.
61
50
 
62
- If you don't specify a `plugin-instance` Visage will attempt to graph all plugin
63
- instances under the specified `plugin`, e.g. `cpu-0` will display `cpu-idle`,
64
- `cpu-interrupt`, `cpu-nice`, etc, whereas `cpu-0/cpu-wait` will only show
65
- `cpu-wait`. You can also choose a specific group of plugin instances to graph,
66
- with something like `cpu-0/cpu-system/cpu-user/cpu-wait`.
51
+ If you get a `command not found` when running the above command (RubyGems likely
52
+ isn't on your PATH), try this instead:
67
53
 
68
- It should be pretty easy to deduce the config format from the existing file
69
- (it's simple nested key-value data).
70
-
71
- Make sure collectd's RRD directory is readable by whatever user the web server
72
- is running as. You can specify where collectd's rrd directory is in `init.rb`,
73
- with the `c['rrddir']` key.
54
+ $ $(dirname $(dirname $(gem which visage-app)))/bin/visage start
74
55
 
75
56
  Deploying
76
57
  ---------
77
58
 
59
+ Visage can be deployed on Apache with Passenger:
60
+
61
+ $ sudo apt-get install libapache2-mod-passenger
62
+
78
63
  Visage can attempt to generate an Apache vhost config for use with Passenger:
79
64
 
80
65
  $ visage genapache
@@ -94,9 +79,29 @@ Visage can attempt to generate an Apache vhost config for use with Passenger:
94
79
 
95
80
  Copypasta this into your system's Apache config structure and tune to taste.
96
81
 
97
- Ubuntu users looking for Passenger packages should add John Ferlito's
98
- [mod-passenger PPA](https://launchpad.net/~johnf-inodes/+archive/mod-passenger)
99
- to their apt sources.
82
+ To do this on Debian/Ubuntu:
83
+
84
+ $ sudo -s
85
+ $ visage genapache > /etc/apache2/sites-enabled/visage
86
+ $ a2dissite default
87
+ $ service apache2 reload
88
+
89
+ Then head to your Apache instance and Visage will be up and running.
90
+
91
+ Configuring
92
+ -----------
93
+
94
+ On the off chance you need to tweak Visage's configuration, it lives in several files
95
+ under `lib/visage/config/`.
96
+
97
+ * `plugin-colors.yaml` - colors for specific plugins/plugin instances
98
+ * `fallback-colors.yaml` - ordered list of fallback colors
99
+ * `init.rb` - bootstrapping code, specifies collectd's RRD directory
100
+
101
+ Make sure collectd's RRD directory is readable by whatever user the web server
102
+ is running as. You can specify where collectd's rrd directory is in `init.rb`,
103
+ with the `c['rrddir']` key.
104
+
100
105
 
101
106
  Developing + testing
102
107
  --------------------
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
data/bin/visage CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  require 'pathname'
4
4
 
5
+ require 'socket'
6
+ fqdn = Socket.gethostbyname(Socket.gethostname).first
7
+
5
8
  @root = Pathname.new(File.dirname(__FILE__)).parent.expand_path
6
9
  action = ARGV[0]
7
10
 
@@ -9,6 +12,17 @@ case action
9
12
  when "start"
10
13
  require 'rubygems'
11
14
  require 'rack'
15
+
16
+ puts ' _ ___'
17
+ puts '| | / (_)________ _____ ____'
18
+ puts '| | / / / ___/ __ `/ __ `/ _ \\'
19
+ puts '| |/ / (__ ) /_/ / /_/ / __/'
20
+ puts '|___/_/____/\__,_/\__, /\___/'
21
+ puts ' /____/'
22
+ puts
23
+ puts "will be running at http://#{fqdn}:9292/"
24
+ puts
25
+
12
26
  config = @root.join('lib/visage/config.ru').to_s
13
27
  server = Rack::Server.new(:config => config, :Port => 9292)
14
28
  server.start
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Lindsay Holmwood