0

I need to monitor my postfix, dovecot and sasl process and start them if something go wrong. I read about daemontools and I want it to monitor mail services. Can I find somewhere step by step guide to setup daemontools on Debian? I've already installed daemontools and daemontools-run packages.

PsychoX
  • 175
  • 3
  • As a footnote, for anyone interested in doing this for some other reason: https://serverfault.com/questions/904691/autostart-restart-program-simply-with-daemontools-in-debian-9/904692#904692 – Hayden Thring Mar 26 '18 at 22:21

2 Answers2

2

Your intention is generally good. But...

Postfix and Dovecot are two of the most robust and mature software on your server. If one of them fail then you have another big problem. But most probably this problem is not related to Postfix or Dovecot. A restart of these services will run in the same problem as there was before. Postfix and Dovecot have self-healing mechanisms on board that restart their subroutines on their own. And SASL is a subroutine of Dovecot so there is no need to monitor this.

mailq
  • 17,023
  • 2
  • 37
  • 69
1

daemontools is not really a meant to be used as a monitoring system for existing services. It is more of a framework for creating daemonized services that happens to have builtin self-monitoring and auto-restarting capabilities.

With a great deal of effort, you may be able to retrofit the postfix, dovecot, and sasl processes to run within the daemontools framework, but I can almost certainly guarantee that your time will be much better spent learning a tool better suited for what you want to accomplish.

I recommend you look into monit. It is packaged for Debian and should work well with the other Debian-packaged services that you want to monitor.

Steven Monday
  • 13,599
  • 4
  • 36
  • 45