lib/arborist/monitor/snmp/disk.rb
changeset 17 e4f0fd44734d
parent 14 d5cb8bd33170
child 26 54f2f57cc0b0
--- a/lib/arborist/monitor/snmp/disk.rb	Mon Apr 09 18:51:52 2018 -0700
+++ b/lib/arborist/monitor/snmp/disk.rb	Wed Jun 13 08:54:19 2018 -0700
@@ -60,7 +60,7 @@
 		# Paths to exclude from checks
 		#
 		setting :exclude,
-			default: [ '^/dev(/.+)?$', '^/net(/.+)?$', '^/proc$', '^/run$', '^/sys/' ] do |val|
+			default: [ '^/dev(/.+)?$', '/dev$', '^/net(/.+)?$', '/proc$', '^/run$', '^/sys/', '/sys$' ] do |val|
 			mounts = Array( val ).map{|m| Regexp.new(m) }
 			Regexp.union( mounts )
 		end
@@ -114,12 +114,10 @@
 		warnings = []
 		mounts.each_pair do |path, percentage|
 
-			warn = begin
-			  if warn_at.is_a?( Hash )
-				  warn_at[ path ] || WARN_AT
-			  else
-				  warn_at
-			  end
+			warn = if warn_at.is_a?( Hash )
+				warn_at[ path ] || WARN_AT
+			else
+				warn_at
 			end
 
 			self.log.debug "%s:%s -> at %d, warn at %d" % [ host, path, percentage, warn ]