现在你应该使用 monit 为你的应用程序实现监控和自动重启。关于自动重启,你也可以使用 pm2。
以下是你应该为应用程序实现的监控项。
Monit 提供了许多服务的现有配置。你可以在 /etc/monit/conf-available 中找到它们。你可以将它们(如果需要修改)复制到 /etc/monit/conf-enabled 以启用它们。
/etc/monit/conf-available
/etc/monit/conf-enabled