

Private nameserver checks (only necessary if you are running private nameservers from your DV server):Ĭheck process named with pidfile /var/named/chroot/var/run/named/named.pid.Cron check (to ensure cron jobs are running):Ĭheck process crond with pidfile "/var/run/crond.pid".Stop program "/etc/init.d/psa-spamassassin stop" Start program "/etc/init.d/psa-spamassassin start" SpamAssassin checks (to ensure SpamAssassin restarts after periods of high CPU use):Ĭheck process spamd with pidfile /var/run/spamd/spamd_full.pid.If failed port 995 type tcpssl sslauto protocol pop then restart If failed port 110 type tcp protocol pop then restartĬheck process pop3d-ssl with pidfile "/var/run/pop3d-ssl.pid" If failed port 993 type tcpssl sslauto protocol imap then restartĬheck process pop3d with pidfile "/var/run/pop3d.pid" If failed port 143 type tcp protocol imap then restartĬheck process imapd-ssl with pidfile "/var/run/imapd-ssl.pid" Stop program = "/etc/init.d/courier-imap stop" Start program = "/etc/init.d/courier-imap start" Mail server check for incoming mail responsiveness (IMAP, IMAP-SSL, POP3,and POP3-SSL):Ĭheck process imapd with pidfile "/var/run/imapd.pid".If failed port 25 protocol smtp then restart Stop program = "/bin/bash -c '/etc/init.d/qmail stop & /etc/init.d/xinetd stop'" Start program = "/bin/bash -c '/etc/init.d/qmail start & /etc/init.d/xinetd start'" SMTP and qmail server check (for overall outgoing mail health and sending functionality):Ĭheck process qmail with pidfile "/var/run/xinetd.pid".If failed port 3306 protocol mysql then restart Start program = "/etc/init.d/mysqld start" Database checks (to ensure databases are responding):Ĭheck process mysqld with pidfile "/var/run/mysqld/mysqld.pid".If 5 restarts within 5 cycles then timeout PassCheck="$(md5sum /etc/psa/.psa.shadow | awk '' /proc/vz/veinfo) port 80 protocol http then restart
MONIT FILE PASSWORD
MONIT FILE INSTALL
configure -prefix=/usr -without-pam make make install mkdir /etc/monit.d/

This will also configure Monit without the PAM option.
MONIT FILE SOFTWARE
This is primarily to keep an extra degree of separation between Plesk, which lives in /usr/local/psa, and other software on the system. We'll use a fairly vanilla configuration, The following command will change the prefix so it is set to /usr rather than /usr/local (which is what Monit will default to). From here, Monit needs to be built from source.
MONIT FILE DOWNLOAD
Then, download and unpack Monit: wget tar zxf monit-5.6.tar.gz rm -f monit-5.6.tar.gz cd monit-5.6
MONIT FILE CODE
That way, you always know where to find the temperamental data/source code you use for new installations.įirst, step into the /usr/local/src directory: cd /usr/local/src For organizational purposes, it is good practice to use /usr/local/src.
