I used to use monit for process monitoring but recently switched over to inspeqtor (https://github.com/mperham/inspeqtor). Same guy who wrote sidekiq (I think he worked on monit a while ago too). It's similar to monit but has a much cleaner syntax, and uses upstart for managing processes (start / stop / restart / logging).
The problem I had with monit was that it was always difficult to get the commands right for restarting a process - inspeqtor is way better in that regard. It also plays nicely with capistrano deployments, so you don't get restart notifications whenever you do a deployment. That being said, I'm only using it to check on my background processes - I'm not using it to monitor whether or not my rails instances start cleanly. I'm running on EC2 behind an ELB, which requires a "health check" url on the servers. So if rails doesn't restart, that health check would fail and the instance would get removed from the load balancer. Couldn't you just use something like pingdom to make sure that your server is responding? On Sat, Mar 12, 2016 at 4:37 PM, Rob Kaufman <[email protected]> wrote: > Neither upstart or systmd really notifies you well on the restart. You > might want something like god or monit instead. Or make sure your log > monitoring is set up well (or both ideally). > > Rob > > On Mon, Mar 7, 2016 at 10:51 PM Xavier Lange <[email protected]> wrote: > >> This sounds like a good spot for a process monitor. If you’re on ubuntu >> 14.04 then the built-in upstart is really easy and handles restarting >> applications. Everything else (including later Ubuntus) is charging towards >> systemd which has a steeper learning curve — totally workable though. >> Whatever process monitor you end up using, see if you can configure it to >> send emails when a process goes down. >> >> Ansible would be the right tool for laying down this process monitoring >> config. >> >> Good luck! >> >> Xavier >> >> On Mar 7, 2016, at 10:36 PM, Chris McCann <[email protected]> wrote: >> >> All, >> >> We use Ansible to deploy our Rails app onto EC2 servers on Amazon Web >> Services. >> >> An issue with a missing environment variable caused the Rails process to >> fail on restart but that wasn't communicated through Ansible. Only after >> running `bundle exec rails c` on the server did the error become apparent >> due to a Rails initializer that verifies all required env vars are present. >> >> Does anyone here have a mechanism in their deployment process that >> verifies the Rails process restarts cleanly, in particular, via Ansible? >> >> Cheers, >> >> Chris >> >> >> >> -- >> -- >> SD Ruby mailing list >> [email protected] >> http://groups.google.com/group/sdruby >> --- >> You received this message because you are subscribed to the Google Groups >> "SD Ruby" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- >> -- >> SD Ruby mailing list >> [email protected] >> http://groups.google.com/group/sdruby >> --- >> You received this message because you are subscribed to the Google Groups >> "SD Ruby" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > -- > -- > SD Ruby mailing list > [email protected] > http://groups.google.com/group/sdruby > --- > You received this message because you are subscribed to the Google Groups > "SD Ruby" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby --- You received this message because you are subscribed to the Google Groups "SD Ruby" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
