dallasmarlow/nrpe_check — pull request #2 by byxorna (2013-09-03 17:37:02+00:00)
Title: sync IO when required, instead of only when using extend

When using nrpe_check include (not extend, see below), IO is not sync'd properly.

This causes NRPE to not read the output generated in the check block. This PR enables fsync for both usage styles (include/extend).

require 'nrpe_check'
class CheckStuff
include NRPE::Check
def initialize
end
def run
check do
status :unknown, "unknown"
exit_with_status :ok, "groovy"
end
end
end
CheckStuff.new.run