Sha256: f965c3a4386380a578183bc603158051fa500118ee6ca68491dd5cd739cfd981
Contents?: true
Size: 414 Bytes
Versions: 51
Compression:
Stored size: 414 Bytes
Contents
default[:file] = '/var/tmp/error.txt' default[:max_lines] = 100 default[:report_lines] = 5 default[:service] = 'check state file' collect do content = File.read(plugin.file).split("\n").delete_if { |x| x.strip.empty? } event( :service => "#{plugin.service} #{plugin.file}", :description => content.last(plugin.report_lines).join("\n"), :metric => content.count, :critical => 1 ) end
Version data entries
51 entries across 51 versions & 1 rubygems