2

I am configuring some services to run on Ubuntu server.

I was going through the link below where they use runit to run the services and monit to monitor the services -

http://rubyworks.rubyforge.org/manual/monit.html http://rubyworks.rubyforge.org/manual/runit.html

1) The services are all started through monit. 2) Monit inturn starts them using runit.

What is the advantage of using the above setup, where the services are run using runit via Monit. Why use runit in the middle, instead of directly starting them with monit?

murtaza52
  • 151
  • 9

2 Answers2

2

runit is better suited for running processes, as it does not depend upon the pid files and, will also restart if the child process crashes.

Monit in turn monitors the performance of these process, and restarts them using runit as needed.

murtaza52
  • 151
  • 9
  • one additional consideration is that I found writing runit daemon scripts is simpler than writing my own init script for monit's use. YMMV. – JL Peyret Aug 16 '18 at 19:24
-1

Monit polls the processes, whereas runit runs them as child processes. My guess is that adding runit to the monit setup has the ability to increase the uptime percentage of your services.

parity3
  • 101
  • 2
  • [SF] is not a place to discuss the merits of one technical approach vs another. This post is more a ramble then an actual, helpful answer. Please read the [help] to learn how this site works. – Sven Oct 30 '14 at 07:07
  • Thanks for correcting me, and your continued effort in moderating an amazing internet resource. I hope my new answer demonstrates that I am 'getting the hang of things'. – parity3 Oct 31 '14 at 15:56