Gentoo Monit

Published on Author Artem ButusovLeave a comment


emerge app-admin/monit


Save default config file:

mv /etc/monitrc /etc/monitrc.dist


# each cycle is 1 minute, wait for 2 minutes before starting monitoring to be sure that all services are up.
set daemon 60 with start delay 120

# if we will use integrated monit ssl validation then we need normal validation because by default will not check ssl certificates
set ssl {
    verify     : enable,
    selfsigned : reject

# defaults
set logfile syslog
set pidfile /var/run/
set idfile /var/lib/
set statefile /var/lib/monit.state

# example how to auth through google mail to send emails
set mailserver port 587 from_username "" password "secret" using TLSV1

# who will receive message and when
set alert not on { instance, action } with reminder on 180 cycles

# set message format
set mail-format {
    subject: Monit $HOST: $SERVICE ~ $EVENT -> $ACTION
    message: Monit $HOST: $SERVICE ~ $EVENT -> $ACTION



# run monit status web service on localhost only
set httpd port 2812 and
    use address localhost
    allow localhost 

# include custom rules
include /etc/monit.d/*
rc-update add monit default
/etc/init.d/monit start

When you will update some configs:

/etc/init.d/monit reload

When you need to check status:

monit status

Please refer for monit documentation how to setup custom monitoring rules.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.