riemann-babbler 0.5.7 → 0.5.8

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.
@@ -26,8 +26,8 @@ class Riemann::Babbler::Disk < Riemann::Babbler
26
26
  point_stat = Filesystem.stat point
27
27
  human_point = point == "/" ? "/root" : point
28
28
  human_point.gsub!(/^\//, "").gsub!(/\//, "_")
29
- disk << { :service => plugin.service + " #{human_point} % block", :metric => point_stat.blocks_available.to_f/point_stat.blocks }
30
- disk << { :service => plugin.service + " #{human_point} % inode", :metric => point_stat.files_available.to_f/point_stat.files }
29
+ disk << { :service => plugin.service + " #{human_point} % block", :metric => 1- point_stat.blocks_available.to_f/point_stat.blocks }
30
+ disk << { :service => plugin.service + " #{human_point} % inode", :metric => 1 - point_stat.files_available.to_f/point_stat.files }
31
31
  disk << { :service => plugin.service + " #{human_point} abs free", :metric => point_stat.blocks_free * point_stat.block_size, :state => 'ok'}
32
32
  disk << { :service => plugin.service + " #{human_point} abs total", :metric => point_stat.blocks * point_stat.block_size, :state => 'ok'}
33
33
  end
@@ -13,7 +13,7 @@ class Riemann::Babbler::Memory < Riemann::Babbler
13
13
  used = total - free
14
14
  free_bc = free + buffers + cached
15
15
 
16
- fraction = (free.to_f / total)
16
+ fraction = 1 - (free.to_f / total)
17
17
  swap_fraction = m['SwapTotal'] == 0 ? 0 : 1 - m['SwapFree'].to_f/m['SwapTotal']
18
18
 
19
19
  desc = "usage\n\n#{shell('ps -eo pmem,pid,cmd | sort -nrb -k1 | head -10').chomp}"
@@ -1,5 +1,5 @@
1
1
  module Riemann
2
2
  class Babbler
3
- VERSION = '0.5.7'
3
+ VERSION = '0.5.8'
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.5.7
4
+ version: 0.5.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -164,7 +164,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
164
164
  version: '0'
165
165
  segments:
166
166
  - 0
167
- hash: 3251859028300430947
167
+ hash: -1229174746116563752
168
168
  required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  none: false
170
170
  requirements: