Can systemd replace monit?
Essentially monit is a monitoring tool, which you configure tests that will be evaluated at certain intervals. If one of the tests fails, then it will take action depending on the rules you assign to it. Monit can monitor processes and restart them when required. It’s possible to restart a process based on CPU usage or memory, for instance.
Can I do the same only with Systemd? If so, how could it be done?
Thanks!!
You might also consider managing the resources available to your units with systemd. It won't directly mail you if, say, httpd memory consumption gets over 1GB, but you can configure it to restrict the memory available to httpd and all child processes to 1GB. The magic happens using cgroups, read more at http://0pointer.de/blog/projects/resources.html