bin/check-smart-status.rb in sensu-plugins-disk-checks-1.0.1 vs bin/check-smart-status.rb in sensu-plugins-disk-checks-1.0.2

- old
+ new

@@ -11,11 +11,11 @@ # # I defined smart.json file based on this two specification # http://en.wikipedia.org/wiki/S.M.A.R.T.#cite_note-kingston1-32 # http://media.kingston.com/support/downloads/MKP_306_SMART_attribute.pdf # -# I tested on several Seagate, WesternDigital hdd and Cosair force Gt SSD +# I tested on several Seagate, Western Digital hdd and Cosair force Gt SSD # # It is possible some hdd give strange attribute values and warnings based on it # but in this case simply define attribute list with '-a' parameter # and ignore wrong parameters. Maybe attribute 1 and 201 will be wrong because # format of this attributes specified by hdd vendors. @@ -36,11 +36,11 @@ # smartmontools # smart.json # # USAGE: # You need to add 'sensu' user to suduers or you can't use 'smartctl' -# sensu ALL=(ALL) NOPASSWD:ALL +# sensu ALL=(ALL) NOPASSWD:/usr/sbin/smartctl # # PARAMETERS: # -b: smartctl binary to use, in case you hide yours (default: /usr/sbin/smartctl) # -d: default threshold for crit_min,warn_min,warn_max,crit_max (default: 0,0,0,0) # -a: SMART attributes to check (default: all) @@ -225,10 +225,10 @@ value >> 32 end # find all devices from /proc/partitions or from parameter # - def find_devices # rubocop:disable all + def find_devices # Return parameter value if it's defined return config[:devices].split(',') unless config[:devices] == 'all' # List all device and split it by new line all = `cat /proc/partitions`.split("\n")