visage-app 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -31,3 +31,17 @@ begin
31
31
  rescue LoadError
32
32
  puts "Jeweler not available. Install it with: gem install jeweler"
33
33
  end
34
+
35
+ desc "push gem"
36
+ task :push do
37
+ filenames = Dir.glob("pkg/*.gem")
38
+ filenames_with_times = filenames.map do |filename|
39
+ [filename, File.mtime(filename)]
40
+ end
41
+
42
+ newest = filenames_with_times.sort_by { |tuple| tuple.last }.last
43
+ newest_filename = newest.first
44
+
45
+ command = "gem push #{newest_filename}"
46
+ system(command)
47
+ end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.8
@@ -72,6 +72,9 @@ class CollectdJSON
72
72
  (!datapoint || datapoint.nan?) ? 0.0 : datapoint
73
73
  end
74
74
 
75
+ # Sometimes the last value from the RRD is ridiculously large.
76
+ metric[-1] = 0
77
+
75
78
  color = color_for(:host => data[:host],
76
79
  :plugin => data[:plugin],
77
80
  :instance => data[:instance],
@@ -103,6 +106,7 @@ class CollectdJSON
103
106
 
104
107
  return fallback_color unless plugin
105
108
  return color_for(opts.merge(:plugin => plugin[/(.+)-.+$/, 1])) unless @colors[plugin]
109
+ return fallback_color unless instance
106
110
  return color_for(opts.merge(:instance => instance[/(.+)-.+$/, 1])) unless @colors[plugin][instance]
107
111
  return @colors[plugin][instance][metric] if @colors[plugin][instance]
108
112
  return fallback_color
data/lib/visage/config.ru CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require 'pathname'
3
4
  @root = Pathname.new(File.dirname(__FILE__)).parent.parent.expand_path
4
5
  $: << @root.to_s
5
6
 
@@ -1,45 +1,49 @@
1
- ---
2
- plugin_colors:
3
- memory:
4
- memory-used:
1
+ ---
2
+ plugin_colors:
3
+ memory:
4
+ memory-used:
5
5
  value: "#cc0000"
6
- memory-buffered:
6
+ memory-buffered:
7
7
  value: "#edd400"
8
- memory-cached:
8
+ memory-cached:
9
9
  value: "#3465a4"
10
- memory-free:
10
+ memory-free:
11
11
  value: "#73d216"
12
- cpu:
13
- cpu-idle:
12
+ cpu:
13
+ cpu-idle:
14
14
  value: "#eeeeec"
15
- cpu-wait:
15
+ cpu-wait:
16
16
  value: "#edd400"
17
- cpu-user:
17
+ cpu-user:
18
18
  value: "#3465a4"
19
- cpu-system:
19
+ cpu-system:
20
20
  value: "#cc0000"
21
21
  cpu-nice:
22
22
  value: "#73d216"
23
- cpu-softirq:
23
+ cpu-softirq:
24
24
  value: "#ad7fa8"
25
25
  cpu-interrupt:
26
26
  value: "#5c3566"
27
27
  cpu-steal:
28
28
  value: "#2e3436"
29
- swap:
30
- swap-used:
29
+ swap:
30
+ swap-used:
31
31
  value: "#cc0000"
32
- swap-free:
32
+ swap-free:
33
33
  value: "#73d216"
34
- swap-cached:
34
+ swap-cached:
35
35
  value: "#3465a4"
36
- load:
37
- load:
36
+ swap_io-in:
37
+ value: "#edd400"
38
+ swap_io-out:
39
+ value: "#5c3566"
40
+ load:
41
+ load:
38
42
  longterm: "#ef2929"
39
43
  shortterm: "#73d216"
40
44
  midterm: "#3465a4"
41
45
  df:
42
- df:
46
+ df:
43
47
  used: "#cc0000"
44
48
  free: "#73d216"
45
49
  disk:
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 7
9
- version: 0.1.7
8
+ - 8
9
+ version: 0.1.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Lindsay Holmwood