0

I put next file in /etc/monit/conf.d/sidekiq:

check process sidekiq with pidfile /data/my_app/current/tmp/pids/sidekiq.pid

And expect that monit will log a message when service is not running.

I have sidekiq process running:

# ps aux | grep sidekiq
deploy    3265  1.1 11.9 855108 121636 ?       Sl   12:52   0:02 sidekiq 3.0.0 my_app [0 of 20 busy]

And have 3265 in /data/my_app/current/tmp/pids/sidekiq.pid

Then I restart monit (no alerts), and kill -9 3265.

And silence in monit's log.. Where I was wrong?

mikdiet
  • 101
  • 3
  • Actually, do you have others services check that works fine ? – krisFR Mar 22 '14 at 18:52
  • Yes, I do the same with postgresql and it works fine. The only difference I see is how these processes are run - pg is run with `service postgresql start`, but sidekiq is run with `bundle exec sidekiq` – mikdiet Mar 22 '14 at 19:19

1 Answers1

0

I check process name with ps -p 20688 -o comm= and realize that it named as ruby not sidekiq!

So, when I replace check process sidekiq ... to check process ruby ..., monit starts to see it and log a message when I kill this process.

mikdiet
  • 101
  • 3