VPS1Euro Dashboard Wiki

Complete client guide: infrastructure, services, account and support.

FR EN

Monitor services and email alerts (monit)

Automatically restart downed services and receive email alerts.

What this tutorial does

The tutorial "Monitor services and email alerts (monit)" helps you achieve this goal:

Automatically restart downed services and receive email alerts.

← Back to tutorials
1 profiles 23 steps 5 commands ~20 min

Debian/Ubuntu

  1. Install monit: apt install -y monit
  2. --- Main configuration: /etc/monit/monitrc ---
  3. Uncomment and configure the web interface:
  4. set httpd port 2812 and use address localhost
  5. allow admin:password
  6. Configure email alerts:
  7. set mailserver smtp.gmail.com port 587
  8. username "[email protected]" password "app_password"
  9. using tlsv12
  10. set alert [email protected]
  11. --- Monitor Apache ---
  12. Create /etc/monit/conf.d/apache:
  13. check process apache2 with pidfile /var/run/apache2/apache2.pid
  14. start program = "/bin/systemctl start apache2"
  15. stop program = "/bin/systemctl stop apache2"
  16. if cpu > 80% for 2 cycles then alert
  17. if memory > 512 MB then alert
  18. --- Monitor disk space ---
  19. check filesystem rootfs with path /
  20. if space usage > 85% then alert
  21. --- Start monit ---
  22. systemctl enable --now monit
  23. monit reload && monit status