summaryrefslogtreecommitdiff
path: root/monit
diff options
context:
space:
mode:
Diffstat (limited to 'monit')
-rw-r--r--monit/bind9.conf7
-rw-r--r--monit/check_disc.conf2
-rw-r--r--monit/fail2ban.conf5
-rw-r--r--monit/fcgiwrap.conf5
-rw-r--r--monit/mysql.conf6
-rw-r--r--monit/nginx.conf9
-rw-r--r--monit/passwd.conf6
-rw-r--r--monit/redis.conf10
-rw-r--r--monit/smokeping.conf6
-rw-r--r--monit/zabbix-agentd.conf8
10 files changed, 64 insertions, 0 deletions
diff --git a/monit/bind9.conf b/monit/bind9.conf
new file mode 100644
index 0000000..7aad9e9
--- /dev/null
+++ b/monit/bind9.conf
@@ -0,0 +1,7 @@
+check process bind9 with pidfile /var/run/named/named.pid
+ start program = "/etc/init.d/bind9 start"
+ stop program = "/etc/init.d/bind9 stop"
+ if failed host 127.0.0.1 port 53 type tcp protocol dns then restart
+ if failed host 127.0.0.1 port 53 type udp protocol dns then restart
+ if 3 restarts within 3 cycles then alert
+ if 5 restarts within 5 cycles then timeout
diff --git a/monit/check_disc.conf b/monit/check_disc.conf
new file mode 100644
index 0000000..c4b46b5
--- /dev/null
+++ b/monit/check_disc.conf
@@ -0,0 +1,2 @@
+CHECK FILESYSTEM root with PATH /
+ if SPACE usage > 80% then alert
diff --git a/monit/fail2ban.conf b/monit/fail2ban.conf
new file mode 100644
index 0000000..96f9d26
--- /dev/null
+++ b/monit/fail2ban.conf
@@ -0,0 +1,5 @@
+check process fail2ban with pidfile /var/run/fail2ban/fail2ban.pid
+ start program = "/etc/init.d/fail2ban start"
+ stop program = "/etc/init.d/fail2ban stop"
+ if 3 restarts within 3 cycles then alert
+ if 5 restarts within 5 cycles then timeout
diff --git a/monit/fcgiwrap.conf b/monit/fcgiwrap.conf
new file mode 100644
index 0000000..5866503
--- /dev/null
+++ b/monit/fcgiwrap.conf
@@ -0,0 +1,5 @@
+check process fcgiwrap with pidfile /var/run/fcgiwrap.pids
+ start program = "/etc/init.d/fcgiwrap start"
+ stop program = "/etc/init.d/fcgiwrap stop"
+ if 3 restarts within 3 cycles then alert
+ if 5 restarts within 5 cycles then timeout
diff --git a/monit/mysql.conf b/monit/mysql.conf
new file mode 100644
index 0000000..96f0f8d
--- /dev/null
+++ b/monit/mysql.conf
@@ -0,0 +1,6 @@
+check process mysqld with pidfile /var/run/mysqld/mysqld.pid
+ start program = "/etc/init.d/mysqld start"
+ stop program = "/etc/init.d/mysqld stop"
+ if failed host 127.0.0.1 port 3306 then restart
+ if 3 restarts within 3 cycles then alert
+ if 5 restarts within 5 cycles then timeout
diff --git a/monit/nginx.conf b/monit/nginx.conf
new file mode 100644
index 0000000..c194f9a
--- /dev/null
+++ b/monit/nginx.conf
@@ -0,0 +1,9 @@
+check process nginx with pidfile /var/run/nginx.pid
+ group www-data
+ start program = "/etc/init.d/nginx start"
+ stop program = "/etc/init.d/nginx stop"
+ if children > 250 then restart
+ if loadavg(5min) greater than 2 for 8 cycles then stop
+ if failed host localhost port 80 type tcp protocol http for 3 times within 5 cycles then alert
+ if 3 restarts within 5 cycles then alert
+ if 5 restarts within 5 cycles then timeout
diff --git a/monit/passwd.conf b/monit/passwd.conf
new file mode 100644
index 0000000..0040495
--- /dev/null
+++ b/monit/passwd.conf
@@ -0,0 +1,6 @@
+check file passwd with path /etc/passwd
+ if failed checksum and
+ expect the 1a4749a0f41e47eb9339da32adbbcf14 sum then alert
+ if failed permission 644 then alert
+ if failed uid root then alert
+ if failed gid root then alert
diff --git a/monit/redis.conf b/monit/redis.conf
new file mode 100644
index 0000000..201a9ab
--- /dev/null
+++ b/monit/redis.conf
@@ -0,0 +1,10 @@
+check process redis-server with pidfile "/var/run/redis/redis-server.pid"
+ start program = "/etc/init.d/redis-server start"
+ stop program = "/etc/init.d/redis-server stop"
+ if 2 restarts within 3 cycles then timeout
+ if totalmem > 100 Mb then alert
+ if children > 255 for 5 cycles then stop
+ if cpu usage > 95% for 3 cycles then restart
+ if failed host 127.0.0.1 port 6379 then restart
+ if 3 restarts within 3 cycles then alert
+ if 5 restarts within 5 cycles then timeout
diff --git a/monit/smokeping.conf b/monit/smokeping.conf
new file mode 100644
index 0000000..6851415
--- /dev/null
+++ b/monit/smokeping.conf
@@ -0,0 +1,6 @@
+check process smokeping with pidfile /var/run/smokeping/smokeping.pid
+ start program = "/etc/init.d/smokeping start"
+ stop program = "/etc/init.d/smokeping stop"
+ if 3 restarts within 3 cycles then alert
+ if 5 restarts within 5 cycles then timeout
+
diff --git a/monit/zabbix-agentd.conf b/monit/zabbix-agentd.conf
new file mode 100644
index 0000000..43d4915
--- /dev/null
+++ b/monit/zabbix-agentd.conf
@@ -0,0 +1,8 @@
+#check process zabbix-agentd with pidfile /var/run/zabbix-agent/zabbix_agentd.pid
+check process zabbix_agentd with pidfile /var/run/zabbix/zabbix_agentd.pid
+ start program = "/etc/init.d/zabbix-agent start"
+ stop program = "/etc/init.d/zabbix-agent stop"
+# if failed port 10050 for 3 times within 5 cycles then alert
+# if failed port 10050 for 10 times within 10 cycles then restart
+ if 3 restarts within 3 cycles then alert
+ if 5 restarts within 5 cycles then timeout