set daemon 60 set logfile syslog facility log_daemon set mailserver localhost set mail-format { from: monit@localhost } set alert root@localhost # Http settings # --------------------------- set httpd port <%= monit_port %> ssl enable pemfile /var/certs/monit.pem allow admin:<%= monit_password %> # Core processes # --------------------------- check process sshd with pidfile /var/run/sshd.pid start program "/sbin/service sshd start" stop program "/sbin/service sshd stop" if failed port 22 protocol ssh then restart if 5 restarts within 5 cycles then timeout # Includes # --------------------------- include /etc/monit/*.monitrc