Page 1 of 1

Setup & configuration of monit for VestaCP on Debian 8

Posted: Tue Jan 22, 2019 8:46 pm
by kokonauta
Hi, I'm a totally noob with linux and VestaCP, so I ask you to help me with configuration of Monit on Debian 8 and VestaCP.

First of all, I achieve the installation of monit on Debian 8 following this guide:
https://linode.com/docs/uptime/monitori ... ith-monit/

Also I update the Php 7 and MariaDB following this topics:
viewtopic.php?t=14464 (MariaDB)
viewtopic.php?t=13053 (Php 7)

I try to configure monit with this guide, but is for CentOS 7, and I'm totally noob with linux as I said:
https://bizanosa.com/article/monit-conf ... p-centos7/

I enable the port 2812 to enable using the web interface but when i go to the url:2812 can't connect (The monit service is running and restarted).
And other interesting thing on the last link is the configurations to the specific VestaCP services, but I don't know if the configuration paths are OK on debian 8 (the config file is in other place than the tutorial. My conf file is in /etc/monit/monitrc).

This is the configuration for Monit on Centos 7:

Code: Select all

check process httpd with pidfile /var/run/httpd/httpd.pid
  start program = "/usr/bin/systemctl start httpd"
  stop program = "/usr/bin/systemctl stop httpd"

check process nginx with pidfile /var/run/nginx.pid
  start program = "/usr/bin/systemctl start nginx"
  stop program = "/usr/bin/systemctl stop nginx"

check process vesta-nginx with pidfile /var/run/vesta-nginx.pid
  start program = "/usr/bin/systemctl start vesta"
  stop program = "/usr/bin/systemctl stop vesta"

check process vesta-php with pidfile /var/run/vesta-php.pid
  start program = "/usr/bin/systemctl start vesta"
  stop program = "/usr/bin/systemctl stop vesta"

check process exim with pidfile /var/run/exim.pid
  start program "/usr/bin/systemctl start exim"
  stop program "/usr/bin/systemctl stop exim"

check process crond with pidfile /var/run/crond.pid
  start program = "/usr/bin/systemctl start crond"
  stop program = "/usr/bin/systemctl stop crond"

#set logging file as monit.log
set logfile /var/log/monit.log
So... Can someone explain me how can edit this configs to make it valid on Debian 8? Or maybe other configurations that restart VestaCP services when down.

Any help will be very apreciated.