graphiterb 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
data/graphiterb.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{graphiterb}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Philip (flip) Kromer (@mrflip)"]
@@ -49,7 +49,6 @@ module Graphiterb
49
49
 
50
50
 
51
51
  def get_metrics metrics, since
52
- puts '=' * 80
53
52
  df.each do |handle, size, spaceused, spacefree, percentfree, location|
54
53
  disk_name = handle.gsub(/^\//, '').split('/')
55
54
  metrics << [scope(hostname, disk_name, 'available'), spacefree.to_i]
@@ -58,15 +57,18 @@ module Graphiterb
58
57
  lines = top
59
58
 
60
59
  metrics << [scope(hostname, 'cpu', 'avg_usage'), cpu(lines)]
61
- metrics << [scope(hostname, 'processes', 'count'), processes(lines)]
60
+
61
+ proc_total, proc_running = processes(lines)
62
+ metrics << [scope(hostname, 'processes', 'total'), proc_total ]
63
+ metrics << [scope(hostname, 'processes', 'running'), proc_running ]
62
64
 
63
65
  mem_used, mem_free = memory(lines)
64
66
  swap_used, swap_free = swap(lines)
65
67
 
66
- metrics << [scope(hostname, 'memory', 'used'), mem_used ]
67
- metrics << [scope(hostname, 'memory', 'free'), mem_free ]
68
- metrics << [scope(hostname, 'swap', 'used'), swap_used]
69
- metrics << [scope(hostname, 'swap', 'free'), swap_free]
68
+ metrics << [scope(hostname, 'memory', 'used'), mem_used ]
69
+ metrics << [scope(hostname, 'memory', 'free'), mem_free ]
70
+ metrics << [scope(hostname, 'swap', 'used'), swap_used ]
71
+ metrics << [scope(hostname, 'swap', 'free'), swap_free ]
70
72
  end
71
73
 
72
74
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiterb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Philip (flip) Kromer (@mrflip)