monitoring with eye February 10, 2015

in code
I'm setting up some process monitoring with Eye for Mail2FrontMatter.

Eye.config do
  logger '~/site/log/eye.log'
end

Eye.application 'mail2frontmatter' do
  working_dir '~/site'

  check :cpu, every: 10.seconds, below: 100, times: 3

  process :mail2frontmatter do |p|
    check :memory, every: 20.seconds, below: 64.megabytes, times: 3
    pid_file '~/site/tmp/pids/mail2frontmatter.pid'
    start_command 'bundle exec mail2frontmatter -d'
    stop_signals [:QUIT, 2.seconds, :TERM, 1.seconds, :KILL]
  end
end

It's a straightforward framework