Server Monitoring

From Blue-IT.org Wiki

Revision as of 07:09, 21 April 2014 by Apos (talk | contribs) (Created page with "== Monit == sudo apt-get install monit == Zentyal Apache2 == vim /etc/monit/conf.d/zentyal_apache2 check process apache with pidfile /var/run/apache2.pid group www ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Monit

sudo apt-get install monit

Zentyal Apache2

vim /etc/monit/conf.d/zentyal_apache2

 check process apache with pidfile /var/run/apache2.pid
   group www
   group apache
   start program = "/etc/init.d/zentyal webserver start"
   stop program  = "/etc/init.d/zentyal webserver stop"
   if 4 restarts within 20 cycles then timeout
   if failed host localhost port 80 with protocol http and request "/server-status" with timeout 25 seconds for 4 times within 5 cycles then restart
   depend apache_bin
   depend apache_rc

 check file apache_bin with path /usr/sbin/apache2
   group apache
   include /etc/monit/templates/rootbin

 check file apache_rc with path /etc/init.d/zentyal
   group apache
   include /etc/monit/templates/rootbin


Restart monit

service monit restart