Created
September 16, 2009 07:37
-
-
Save sheldonh/187919 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set logfile syslog facility log_daemon | |
check process sshd with pidfile "/var/run/sshd.pid" | |
start = "/etc/init.d/ssh start" | |
stop = "/etc/init.d/ssh stop" | |
if failed port 22 and protocol ssh then restart | |
check process postfix with pidfile /var/spool/postfix/pid/master.pid | |
group mail | |
start program = "/etc/init.d/postfix start" | |
stop program = "/etc/init.d/postfix stop" | |
if failed port 25 protocol smtp then restart | |
if 5 restarts within 5 cycles then timeout | |
check process clamd with pidfile /var/run/clamav/clamd.pid | |
group mail | |
start program = "/etc/init.d/clamav-daemon start" | |
stop program = "/etc/init.d/clamav-daemon stop" | |
if failed unixsocket /var/run/clamav/clamd.ctl then restart | |
check process clamav-milter with pidfile /var/run/clamav/clamav-milter.pid | |
group mail | |
start program = "/etc/init.d/clamav-milter start" | |
stop program = "/etc/init.d/clamav-milter stop" | |
if failed unixsocket /var/spool/postfix/clamav/clamav-milter.ctl then restart | |
check process spamd with pidfile /var/run/spamd.pid | |
group mail | |
start program = "/etc/init.d/spamassassin start" | |
stop program = "/etc/init.d/spamassassin stop" | |
#if failed host 127.0.0.1 port 783 then restart | |
if cpu usage > 99% for 3 cycles then restart | |
if mem usage > 50% for 3 cycles then restart | |
check process spamass-milter with pidfile /var/run/spamass/spamass.pid | |
group mail | |
start program = "/etc/init.d/spamass-milter start" | |
stop program = "/etc/init.d/spamass-milter stop" | |
if failed unixsocket /var/spool/postfix/spamass/spamass.sock then restart | |
check process postgrey with pidfile /var/run/postgrey.pid | |
group mail | |
start program = "/etc/init.d/postgrey start" | |
stop program = "/etc/init.d/postgrey stop" | |
if failed host 127.0.0.1 port 60000 for 3 cycles then restart | |
check process dovecot with pidfile /var/run/dovecot/master.pid | |
group mail | |
start program = "/etc/init.d/dovecot start" | |
stop program = "/etc/init.d/dovecot stop" | |
if failed host 127.0.0.1 port 143 protocol imap then restart | |
if failed host 127.0.0.1 port 993 type tcpssl protocol imap then restart | |
check process imapproxyd with pidfile /var/run/imapproxy.pid | |
group mail | |
start program = "/etc/init.d/imapproxy start" | |
stop program = "/etc/init.d/imapproxy stop" | |
if failed host 127.0.0.1 port 144 protocol imap then restart | |
check process apache2 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 127.0.0.1 port 80 protocol http request / for 3 cycles then restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment