module Remon module Metrics class Salt def initialize(timeout: 240) @timeout = timeout end def status script = File.expand_path("#{__dir__}/../scripts/salt-status") out = `ruby #{script} #{@timeout} 2>/dev/null` output = out.chomp.split(":") { state: output[0], ok: output[1].to_i, total: output[2].to_i } end end end end