Sha256: 600f3cfac5a415a82f67f924a6604895d00d6302483274e7c324bdbd8b1392ac

Contents?: true

Size: 354 Bytes

Versions: 14

Compression:

Stored size: 354 Bytes

Contents

interval 60
default[:proc] = 'ruby'

collect :os => 'linux' do
  count = 0
  Dir['/proc/[0-9]*/cmdline'].each { |p| count += 1 if File.read(p) =~ /#{plugin.proc}/ }
  event(
    :service => "count proc #{plugin.proc}",
    :metric => count,
    :description => "count proc #{plugin.proc}, count: #{count}",
    :warning => 5,
    :critical => 20
  )
end

Version data entries

14 entries across 14 versions & 1 rubygems

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