Sha256: a7b273786e4b9c174f557c8317d2e78c6cccb5bef7a85b9d11f760d85d11393c
Contents?: true
Size: 567 Bytes
Versions: 1
Compression:
Stored size: 567 Bytes
Contents
class Riemann::Babbler::Chkfile < Riemann::Babbler def init plugin.set_default(:service, 'check state file') plugin.states.set_default(:critical, 1) plugin.set_default(:file, '/var/tmp/error.txt') plugin.set_default(:interval, 60) plugin.set_default(:lines, 5) end def collect content = File.read(plugin.file).split("\n").delete_if {|x| x.strip.empty? } { :service => plugin.service + " file #{plugin.file}", :description => content.last(plugin.lines).join("\n"), :metric => content.count } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
riemann-babbler-1.0.7.9 | lib/riemann/babbler/plugins/statusfile.rb |