hi all i have a ubuntu 8.1 server with webmin/ispconfig and as far as i know they both have service monitoring built in but i'm going to try out monit and have set it up with sshd, mysql, apache, sendmail, webmin but for some reason it wont monitor sendmail and sometime apache and it says "not monitored" and if i enable monitoring it says it's initializing but then goes back to "not monitored" here's my config:
Code:
set daemon 60
set logfile syslog facility log_daemon
set mailserver my.ser.ver.ip
set mail-format { from: monit@server1.mydomain.com }
set alert my@email.com
set httpd port 2812 and
allow admin:mypass
check process sshd with pidfile /var/run/sshd.pid
start program "/etc/init.d/ssh start"
stop program "/etc/init.d/ssh stop"
if failed port 22 protocol ssh then restart
if 5 restarts within 5 cycles then timeout
check process mysql with pidfile /var/run/mysqld/mysqld.pid
group database
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
if failed host my.ser.ver.ip port 3306 then restart
if 5 restarts within 5 cycles then timeout
check process apache with pidfile /var/run/apache2.pid
group www
start program = "/etc/init.d/apache2 start"
stop program = "/etc/init.d/apache2 stop"
if failed host www.mydomain.com port 80 protocol http
and request "/monit/token" then restart
if cpu is greater than 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if totalmem > 500 MB for 5 cycles then restart
if children > 250 then restart
if loadavg(5min) greater than 10 for 8 cycles then stop
if 3 restarts within 5 cycles then timeout
check process sendmail with pidfile /var/run/sendmail.pid
group mail
start program = "/etc/init.d/sendmail start"
stop program = "/etc/init.d/sendmail stop"
if failed port 25 protocol smtp then restart
if 5 restarts within 5 cycles then timeout
depends on sendmail_bin
depends on sendmail_rc
check file sendmail_bin with path /usr/lib/sendmail
group mail
if failed checksum then unmonitor
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
check file sendmail_rc with path /etc/init.d/sendmail
group mail
if failed checksum then unmonitor
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
check process webmin with pidfile /var/webmin/miniserv.pid
group webmin
start program = "/etc/init.d/webmin start"
stop program = "/etc/init.d/webmin stop"
if failed host my.ser.ver.ip port 10000 then restart
if 5 restarts within 5 cycles then timeout
check file webmin_rc with path /etc/init.d/webmin
group webmin
if failed checksum then unmonitor
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor