riemann-babbler 0.8.5 → 0.8.6

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.
@@ -3,7 +3,7 @@
3
3
  class Riemann::Babbler::Cpu < Riemann::Babbler
4
4
 
5
5
  def desc
6
- "usage\n\n#{shell('ps -eo pcpu,pid,cmd --sort -pcpu | head -10').chomp}"
6
+ "#{shell('ps -eo pcpu,pid,cmd --sort -pcpu | head -10').chomp}"
7
7
  end
8
8
 
9
9
  def init
@@ -32,7 +32,7 @@ class Riemann::Babbler::Cpu < Riemann::Babbler
32
32
  end
33
33
 
34
34
  @old_cpu[cpu_number] = [u2, n2, s2, i2]
35
- array << { :service => plugin.service + " cpu#{cpu_number}", :metric => fraction, :description => "Cpu#{cpu_number} utilization\n\n" + description } if fraction
35
+ array << { :service => plugin.service + " cpu#{cpu_number}", :metric => fraction, :description => "Cpu#{cpu_number} utilization\n\n#{description}" } if fraction
36
36
  end
37
37
  array
38
38
  end
@@ -28,10 +28,10 @@ class Riemann::Babbler::Disk < Riemann::Babbler
28
28
  point_stat = Filesystem.stat point
29
29
  human_point = point == "/" ? "/root" : point
30
30
  human_point.gsub!(/^\//, "").gsub!(/\//, "_")
31
- disk << { :service => plugin.service + " #{human_point} % block", :description => "Disk usage #{point_stat}, %", :metric => (1- point_stat.blocks_available.to_f/point_stat.blocks).round(2) * 100 }
32
- disk << { :service => plugin.service + " #{human_point} % inode", :description => "Disk usage #{point_stat}, inodes %", :metric => (1 - point_stat.files_available.to_f/point_stat.files).round(2) * 100 }
33
- disk << { :service => plugin.service + " #{human_point} abs free", :description => "Disk free #{point_stat}, B", :metric => point_stat.blocks_free * point_stat.block_size, :state => 'ok'}
34
- disk << { :service => plugin.service + " #{human_point} abs total", :description => "Disk space #{point_stat}, B", :metric => point_stat.blocks * point_stat.block_size, :state => 'ok'}
31
+ disk << { :service => plugin.service + " #{human_point} % block", :description => "Disk usage #{point}, %", :metric => (1- point_stat.blocks_available.to_f/point_stat.blocks).round(2) * 100 }
32
+ disk << { :service => plugin.service + " #{human_point} % inode", :description => "Disk usage #{point}, inodes %", :metric => (1 - point_stat.files_available.to_f/point_stat.files).round(2) * 100 }
33
+ disk << { :service => plugin.service + " #{human_point} abs free", :description => "Disk free #{point}, B", :metric => point_stat.blocks_free * point_stat.block_size, :state => 'ok'}
34
+ disk << { :service => plugin.service + " #{human_point} abs total", :description => "Disk space #{point}, B", :metric => point_stat.blocks * point_stat.block_size, :state => 'ok'}
35
35
  end
36
36
  disk
37
37
  end
@@ -18,7 +18,7 @@ class Riemann::Babbler::Memory < Riemann::Babbler
18
18
  fraction = 1 - (free_bc.to_f / total)
19
19
  swap_fraction = m['SwapTotal'] == 0 ? 0 : 1 - m['SwapFree'].to_f/m['SwapTotal']
20
20
 
21
- desc = "usage\n\n#{shell('ps -eo pcpu,pid,cmd --sort -pmem | head -10').chomp}"
21
+ desc = "#{shell('ps -eo pmem,pid,cmd --sort -pmem | head -10').chomp}"
22
22
 
23
23
  [
24
24
  { :service => plugin.service + " % free", :description => "Memory usage, %", :metric => fraction.round(2) * 100 },
@@ -1,5 +1,5 @@
1
1
  module Riemann
2
2
  class Babbler
3
- VERSION = '0.8.5'
3
+ VERSION = '0.8.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riemann-babbler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -165,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  segments:
167
167
  - 0
168
- hash: 67433924589173159
168
+ hash: -3464785679114137672
169
169
  required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  none: false
171
171
  requirements: