Sha256: 1d9fc4c7c721cab3ae2cd6663a6ac660c538ee76710320c2119c703ae70b972a
Contents?: true
Size: 547 Bytes
Versions: 1
Compression:
Stored size: 547 Bytes
Contents
# frozen_string_literal: true require 'open3' require 'riemann/tools' module Riemann module Tools class Zpool include Riemann::Tools def tick output, status = Open3.capture2e('zpool status -x') report( service: 'zpool health', message: output, state: status.success? ? 'ok' : 'critical', ) rescue Errno::ENOENT => e report( service: 'zpool health', message: e.message, state: 'critical', ) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
riemann-tools-1.3.0 | lib/riemann/tools/zpool.rb |