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 http://c.vestacp.com/0.9.8/rhel/monit/vesta-nginx.conf -O /etc/monit.d/vesta-nginx.conf
wget http://c.vestacp.com/0.9.8/rhel/monit/vesta-php.conf -O /etc/monit.d/vesta-php.conf

# Nginx
wget http://c.vestacp.com/0.9.8/rhel/monit/nginx.conf -O /etc/monit.d/nginx.conf

# Apache
wget http://c.vestacp.com/0.9.8/rhel/monit/httpd.conf -O /etc/monit.d/httpd.conf

# MySQL
wget http://c.vestacp.com/0.9.8/rhel/monit/mysql.conf -O /etc/monit.d/mysql.conf

# Exim
wget http://c.vestacp.com/0.9.8/rhel/monit/exim.conf -O /etc/monit.d/exim.conf

# Dovecot
wget http://c.vestacp.com/0.9.8/rhel/monit/dovecot.conf -O /etc/monit.d/dovecot.conf

# ClamAV
wget http://c.vestacp.com/0.9.8/rhel/monit/clamd.conf -O /etc/monit.d/clamd.conf

# Spamassassin
wget http://c.vestacp.com/0.9.8/rhel/monit/spamassassin.conf -O /etc/monit.d/spamassassin.conf

# OpenSSH
wget http://c.vestacp.com/0.9.8/rhel/monit/sshd.conf -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