Sha256: 553eee57a8e1a288f5a7c2de22f27920b98b3f0ab39f669c4266a75602437f97
Contents?: true
Size: 418 Bytes
Versions: 14
Compression:
Stored size: 418 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
14 entries across 14 versions & 1 rubygems