#Artifactory
check process artifactory
with pidfile /opt/app/artifactory/artifactory/run/artifactory.pid
start program "/etc/init.d/artifactory start" with timeout 210 seconds
stop program "/etc/init.d/artifactory stop" with timeout 120 seconds
if failed url http://localhost/artifactory/api/system/ping for 3 cycles then restart
# Jenkins
check process jenkins
with pidfile /var/run/jenkins.pid
start program "/etc/init.d/jenkins start" with timeout 210 seconds
stop program "/etc/init.d/jenkins stop" with timeout 120 seconds
if failed url http://localhost/jenkins/ for 3 cycles then restart
check process httpd
with pidfile /var/run/httpd/httpd.pid
start program "/etc/init.d/httpd start" with timeout 210 seconds
stop program "/etc/init.d/httpd stop" with timeout 120 seconds
if failed url http://localhost/error/noindex.html for 3 cycles then restart
group server
check system $HOST
if loadavg (1min) > 4 then alert
if loadavg (5min) > 2 then alert
if cpu usage > 95% for 5 cycles then alert
if memory usage > 80% for 5 cycles then alert
# if swap usage > 25% then alert
https://www.unixmen.com/install-and-configure-monit-on-centos-rhel-ubuntu-debian/
Set mail server
For gmail : https://mmonit.com/wiki/Monit/Gmail
# Httpd
# HDD
# System