riemann-babbler 1.2.9 → 1.3.0

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.
@@ -10,8 +10,11 @@ class Riemann::Babbler::Mdadm < Riemann::Babbler
10
10
  File.exists? '/proc/mdstat'
11
11
  end
12
12
 
13
+ def rm_bracket(text)
14
+ text.gsub('[','').gsub(']','')
15
+ end
16
+
13
17
  def mdadm_status_well?(text)
14
- text = text.gsub('[','').gsub(']','')
15
18
  text.gsub(/U/,'').empty?
16
19
  end
17
20
 
@@ -23,7 +26,7 @@ class Riemann::Babbler::Mdadm < Riemann::Babbler
23
26
 
24
27
  device = file[index-1].split(':')[0].strip
25
28
 
26
- mdstatus = line.split(" ").last
29
+ mdstatus = rm_bracket(line.split(" ").last) # UUU
27
30
  next if mdadm_status_well?(mdstatus) # пропускаем все збс
28
31
  if mdstatus == plugin.states.send(device).to_s # пропускаем если стейт зафикисирован в конфиге
29
32
  status << { :service => plugin.service + " #{device}", :metric => 1, :state => 'ok', :description => "mdadm failed device #{device}, but disabled in config" }
@@ -1,5 +1,5 @@
1
1
  module Riemann
2
2
  class Babbler
3
- VERSION = '1.2.9'
3
+ VERSION = '1.3.0'
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: 1.2.9
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: