Monit is a systems software watchdog. It will monitor services to make sure they are running, and take care of them if they get out of control.

Monitoring Modes

There are two ways for monit to operate: as active or passive. Active tries to fix problems while passive only monitors them, but sends alerts when something happens.


For Gentoo / CentOS, add monit to /etc/inittab and run telinit q to start the process and keep it respawning upon death.

# monit
mo:2345:respawn:/usr/bin/monit -Ic /etc/monit/monitrc


For Ubuntu, create /etc/init/monit.conf. Check the location of the monit binary, it may be in /usr/sbin instead of /usr/bin

start on runlevel [2345]
stop on runlevel [06]
exec /usr/bin/monit -Ic /etc/monit/monitrc

Add monit to the default runlevels:

update-rc.d monit defaults
service monit start


Download and install the monit init.d script. Make sure that the MONIT variable in the script points to the correct binary.

Add monit to startup:

chkconfig --levels 235 monit on


Add monit to startup:

echo monit_enable=YES >> /etc/rc.conf
/usr/local/etc/rc.d/monit start
  • Find out how to run monit all the time. See man 5 ttys for possible reference.


The following files should be created for monit-4.10.1nb2:

        /etc/rc.d/monit (m=0755)

Outgoing Email

Monit can be configured to use SocketLabs SMTP relay server to send outgoing email. SocketLabs only supports SSLv3 or no authentication:

set mailserver username <username> password <password>
set mailserver port 587 username <username> password <password> using SSLV3