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

Version Path
kurchatov-0.0.5.pre5 examples/status_file.rb
kurchatov-0.0.5.pre4 examples/status_file.rb
kurchatov-0.0.5.pre2 examples/status_file.rb
kurchatov-0.0.5.pre1 examples/status_file.rb
kurchatov-0.0.4 examples/status_file.rb
kurchatov-0.0.4d examples/status_file.rb
kurchatov-0.0.4c examples/status_file.rb
kurchatov-0.0.4b examples/status_file.rb
kurchatov-0.0.3 examples/status_file.rb
kurchatov-0.0.3b examples/status_file.rb
kurchatov-0.0.3a examples/status_file.rb
kurchatov-0.0.2 examples/status_file.rb
kurchatov-0.0.2b examples/status_file.rb
kurchatov-0.0.1 examples/status_file.rb