about summary refs log tree commit homepage
path: root/examples/monitrc
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-06-05 07:23:53 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-06-05 07:23:53 +0000
commit05a11e01bae2f58357df5afc7595acc95ef79a9c (patch)
treeb10d298c6384b66ab40253eddcbc921290461f72 /examples/monitrc
parentecdd35ccb318e397730b7f29c1753d1d91704365 (diff)
downloadunicorn-05a11e01bae2f58357df5afc7595acc95ef79a9c.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@224 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'examples/monitrc')
-rw-r--r--examples/monitrc57
1 files changed, 57 insertions, 0 deletions
diff --git a/examples/monitrc b/examples/monitrc
new file mode 100644
index 0000000..9964ae9
--- /dev/null
+++ b/examples/monitrc
@@ -0,0 +1,57 @@
+set daemon  60
+set logfile syslog facility log_daemon
+set mailserver localhost
+set mail-format { from: monit@localhost }
+set alert root@localhost
+
+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 127.0.0.1 port 3306 then restart
+   if 5 restarts within 5 cycles then timeout
+
+check process httpd with pidfile /usr/local/apache2/logs/httpd.pid
+   group www-data
+   start program  "/usr/local/apache2/bin/apachectl start"
+   stop program  "/usr/local/apache2/bin/apachectl stop"
+   if failed host localhost port 80 protocol http
+      and request "/" then alert
+   if cpu is greater than 60% for 2 cycles then alert
+   if cpu > 80% for 5 cycles then restart
+   if children > 250 then restart
+   if loadavg(5min) greater than 10 for 8 cycles then alert
+   if 3 restarts within 5 cycles then timeout
+
+check process mongrel_8000 with pidfile /var/rails/MYAPP/log/mongrel.8000.pid
+   group root
+   if failed host 127.0.0.1 port 8000 protocol http
+      and request "/" then alert
+   if cpu is greater than 60% for 2 cycles then alert
+   if cpu > 80% for 5 cycles then restart
+   if loadavg(5min) greater than 10 for 8 cycles then restart
+   if 3 restarts within 5 cycles then timeout
+
+check process mongrel_8001 with pidfile /var/rails/MYAPP/log/mongrel.8001.pid
+   group root
+   if failed host 127.0.0.1 port 8001 protocol http
+      and request "/" then alert
+   if cpu is greater than 60% for 2 cycles then alert
+   if cpu > 80% for 5 cycles then alert
+   if loadavg(5min) greater than 10 for 8 cycles then alert
+   if 3 restarts within 5 cycles then timeout
+
+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
+
+