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

Version Path
kurchatov-0.4.7 examples/status_file.rb
kurchatov-0.4.6 examples/status_file.rb
kurchatov-0.4.5 examples/status_file.rb
kurchatov-0.4.4 examples/status_file.rb
kurchatov-0.4.3 examples/status_file.rb
kurchatov-0.4.2 examples/status_file.rb
kurchatov-0.4.1 examples/status_file.rb
kurchatov-0.3.8 examples/status_file.rb
kurchatov-0.3.7 examples/status_file.rb
kurchatov-0.3.6 examples/status_file.rb
kurchatov-0.3.5 examples/status_file.rb
kurchatov-0.3.4 examples/status_file.rb
kurchatov-0.3.3 examples/status_file.rb
kurchatov-0.3.2 examples/status_file.rb
kurchatov-0.3.1 examples/status_file.rb
kurchatov-0.3.0 examples/status_file.rb
kurchatov-0.2.9 examples/status_file.rb
kurchatov-0.2.8 examples/status_file.rb
kurchatov-0.2.7 examples/status_file.rb
kurchatov-0.2.6 examples/status_file.rb