http://www.glidenote.com/archives/81
http://www.usupi.org/sysad/158.html
http://labs.unoh.net/2008/03/_monit.html
http://mmonit.com/monit/documentation/monit.html#examples
http://mmonit.com/wiki/Monit/ConfigurationExamples#cron
http://sakura.off-soft.net/centos/monit_apache_2.html
# grep -v "^#" /etc/monit/monitrc set daemon 60 # check services intervals with start delay 240 # optional: delay the first check by 4-minutes (by set logfile syslog facility log_daemon set mailserver smtp.gmail.com port 587 username "username@gmail.com" password "password" using tlsv1 set alert mailalert@example.com not { instance } include /etc/monit/conf.d/*.conf # diff -uNr /etc/inittab.bak /etc/inittab --- /etc/inittab.bak 2012-04-01 22:20:31.420619464 +0900 +++ /etc/inittab 2012-04-01 22:35:10.099112439 +0900 @@ -67,3 +67,4 @@ # #T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3 +mo:2345:respawn:/usr/sbin/monit -Ic /etc/monit/monitrc # cat /etc/monit/conf.d/base.conf set init # cat /etc/monit/conf.d/sshd.conf 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 # cat /etc/monit/conf.d/vnc4server.conf check process vnc4server matching Xvnc4 start program "/bin/su user -c 'vnc4server :1 -geometry 1200x768 -localhost'" stop program "/bin/su user -c 'vnc4server -kill :1'" # /sbin/telinit q
めも
ステータス確認系のコマンドが動作しないようだが、詳細未調査
http://d.hatena.ne.jp/tetsuyai/20110416/1302945778
# monit status monit: error connecting to the monit daemon