class SensuPluginsZFS::VDev

Attributes

chksum[R]
name[R]
read[R]
write[R]
zpool[R]

Public Class Methods

new(zpool, name, state, read, write, chksum) click to toggle source
# File lib/sensu-plugins-zfs/zpool.rb, line 56
def initialize(zpool, name, state, read, write, chksum) # rubocop:disable Metrics/ParameterLists
  @zpool = zpool
  @name = name
  @state = state
  @read = read
  @write = write
  @chksum = chksum
end

Public Instance Methods

ok?() click to toggle source
# File lib/sensu-plugins-zfs/zpool.rb, line 65
def ok?
  # TODO: I am not sure why this double negation exists and someone should
  # come back in and fix this later.
  !!(@state =~ /(ONLINE|AVAIL)/) && # rubocop:disable Style/DoubleNegation:
    @read.zero? &&
    @write.zero? &&
    @chksum.zero?
end