How to install Monit monitoring daemon on Centos VestaCP

If you need some extra monitoring and automatization for your services, monit will be great solution. So lets just install it and set it up:

yum -y install monit
chkconfig monit on

Now you can download default configs for vesta:

# Vesta Control Panel
wget -O /etc/monit.d/vesta-nginx.conf
wget -O /etc/monit.d/vesta-php.conf

# Nginx
wget -O /etc/monit.d/nginx.conf

# Apache
wget -O /etc/monit.d/httpd.conf

wget -O /etc/monit.d/mysql.conf

# Exim
wget -O /etc/monit.d/exim.conf

# Dovecot
wget -O /etc/monit.d/dovecot.conf

# ClamAV
wget -O /etc/monit.d/clamd.conf

# Spamassassin
wget -O /etc/monit.d/spamassassin.conf

# OpenSSH
wget -O /etc/monit.d/sshd.conf

After this you just have to configure monit
nano /etc/monit.conf

set httpd port 2812 and # port for checking stats
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow admin:monit # require user ‘admin’ with password ‘monit’
allow @monit # allow users of group ‘monit’ to connect (rw)
allow @users readonly # allow users of group ‘users’ to connect readonly

And thats it you can start your services Monitoring
service monit start