bin/check-raid.rb in sensu-plugins-raid-checks-0.1.0 vs bin/check-raid.rb in sensu-plugins-raid-checks-1.0.0
- old
+ new
@@ -33,12 +33,12 @@
# Check software raid
#
def check_software
if File.exist?('/proc/mdstat')
contents = File.read('/proc/mdstat')
- mg = contents.lines.grep(/active/)
+ mg = contents.lines.grep(/active|blocks/)
unless mg.empty?
- sg = mg.to_s.lines.grep(/\]\(F\)/)
+ sg = mg.to_s.lines.grep(/\]\(F\)|[\[U]_/)
unless sg.empty? # rubocop:disable UnlessElse
warning 'Software RAID warning'
else
ok 'Software RAID OK'
end