configuration-templates

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 28  →  ?path2? @ 29
/monit/debian/templates/acpid
@@ -0,0 +1,20 @@
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
 
check process acpid with pidfile "/var/run/acpid.pid"
group system
group acpid
start program = "/etc/init.d/acpid start"
stop program = "/etc/init.d/acpid stop"
if 5 restarts within 5 cycles then timeout
depends on acpid_bin
depends on acpid_rc
 
check file acpid_bin with path "/usr/sbin/acpid"
group acpid
include /etc/monit/templates/rootbin
 
check file acpid_rc with path "/etc/init.d/acpid"
group acpid
include /etc/monit/templates/rootbin
/monit/debian/templates/at
@@ -0,0 +1,20 @@
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
 
check process atd with pidfile "/var/run/atd.pid"
group system
group atd
start program = "/etc/init.d/atd start"
stop program = "/etc/init.d/atd stop"
if 5 restarts within 5 cycles then timeout
depends on atd_bin
depends on atd_rc
 
check file atd_bin with path "/usr/sbin/atd"
group atd
include /etc/monit/templates/rootbin
 
check file atd_rc with path "/etc/init.d/atd"
group atd
include /etc/monit/templates/rootbin
/monit/debian/templates/cron
@@ -0,0 +1,27 @@
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
 
check process crond with pidfile /var/run/crond.pid
group system
group crond
start program = "/etc/init.d/cron start"
stop program = "/etc/init.d/cron stop"
if 5 restarts with 5 cycles then timeout
depend cron_bin
depend cron_rc
depend cron_spool
 
check file cron_bin with path /usr/sbin/cron
group crond
include /etc/monit/templates/rootbin
 
check file cron_rc with path "/etc/init.d/cron"
group crond
include /etc/monit/templates/rootbin
 
check directory cron_spool with path /var/spool/cron/crontabs
group crond
if failed permission 1730 then unmonitor
if failed uid root then unmonitor
if failed gid crontab then unmonitor
/monit/debian/templates/jetty8
@@ -0,0 +1,5 @@
check process jetty8 with pidfile /var/run/jetty8.pid
start program = "/etc/init.d/jetty8 start"
stop program = "/etc/init.d/jetty8 stop"
if failed host localhost port 8983 then restart
# if 5 restarts within 5 cycles then alert
/monit/debian/templates/mdadm
@@ -0,0 +1,25 @@
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
 
check process mdadm with pidfile /var/run/mdadm/monitor.pid
group system
group mdadm
start program = "/etc/init.d/mdadm start"
stop program = "/etc/init.d/mdadm stop"
if 5 restarts with 5 cycles then timeout
depend mdadm_bin
depend mdadm_rc
depend mdadm_conf
 
check file mdadm_bin with path /sbin/mdadm
group mdadm
include /etc/monit/templates/rootbin
 
check file mdadm_conf with path /etc/mdadm/mdadm.conf
group mdadm
include /etc/monit/templates/rootrc
 
check file mdadm_rc with path "/etc/init.d/mdadm"
group mdadm
include /etc/monit/templates/rootbin
/monit/debian/templates/memcached
@@ -0,0 +1,23 @@
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
 
check process memcache with pidfile /var/run/memcached.pid
group cache
group memcached
start program = "/etc/init.d/memcached start"
stop program = "/etc/init.d/memcached stop"
if failed host 127.0.0.1 port 11211 and protocol memcache then restart
if cpu > 60% for 2 cycles then alert
if cpu > 98% for 5 cycles then restart
if 5 restarts within 20 cycles then timeout
depend memcache_bin
depend memcache_rc
 
check file memcache_bin with path /usr/bin/memcached
group memcached
include /etc/monit/templates/rootbin
 
check file memcache_rc with path /etc/init.d/memcached
group memcached
include /etc/monit/templates/rootbin
/monit/debian/templates/mmonit
@@ -0,0 +1,3 @@
check process mmonit with pidfile /opt/mmonit/logs/mmonit.pid
start program = "/opt/mmonit/bin/mmonit"
stop program = "/opt/mmonit/bin/mmonit stop"
/monit/debian/templates/nginx
@@ -0,0 +1,21 @@
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
 
check process nginx with pidfile /var/run/nginx.pid
group www
group nginx
start program = "/etc/init.d/nginx start"
stop program = "/etc/init.d/nginx stop"
# if failed port 80 protocol http request "/" then restart
if 5 restarts with 5 cycles then timeout
depend nginx_bin
depend nginx_rc
 
check file nginx_bin with path /usr/sbin/nginx
group nginx
include /etc/monit/templates/rootbin
 
check file nginx_rc with path /etc/init.d/nginx
group nginx
include /etc/monit/templates/rootbin
/monit/debian/templates/openntpd
@@ -0,0 +1,20 @@
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
 
check process ntpd with pidfile /var/run/openntpd.pid
group system
group ntpd
start program = "/etc/init.d/openntpd start"
stop program = "/etc/init.d/openntpd stop"
if 4 restarts within 12 cycles then timeout
depend ntpd_bin
depend ntpd_rc
 
check file ntpd_bin with path /usr/sbin/ntpd
group ntpd
include /etc/monit/templates/rootbin
 
check file ntpd_rc with path /etc/init.d/openntpd
group ntpd
include /etc/monit/templates/rootbin
/monit/debian/templates/pdns-recursor
@@ -0,0 +1,22 @@
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
 
check process pdns-recursor with pidfile /var/run/pdns_recursor.pid
group system
group dns
group pdns-recursor
start program = "/etc/init.d/pdns-recursor start"
stop program = "/etc/init.d/pdns-recursor stop"
if failed host 127.0.0.1 port 53 type udp protocol dns for 3 times within 4 cycles then restart
if 5 restarts within 20 cycles then timeout
depend pdns-recursor_bin
depend pdns-recursor_rc
 
check file pdns-recursor_bin with path /usr/sbin/pdns_recursor
group pdns-recursor
include /etc/monit/templates/rootbin
 
check file pdns-recursor_rc with path /etc/init.d/pdns-recursor
group pnds-recursor
include /etc/monit/templates/rootbin
/monit/debian/templates/rsyslog
@@ -0,0 +1,28 @@
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
 
check process rsyslogd with pidfile /var/run/rsyslogd.pid
group system
group rsyslogd
start program = "/etc/init.d/rsyslog start"
stop program = "/etc/init.d/rsyslog stop"
if 5 restarts with 5 cycles then timeout
depend on rsyslogd_bin
depend on rsyslogd_rc
depend on rsyslog_file
 
check file rsyslogd_bin with path /usr/sbin/rsyslogd
group rsyslogd
include /etc/monit/templates/rootbin
 
check file rsyslogd_rc with path "/etc/init.d/rsyslog"
group rsyslogd
include /etc/monit/templates/rootbin
 
check file rsyslog_file with path /var/log/messages
group rsyslogd
if timestamp > 65 minutes then alert
if failed permission 640 then unmonitor
if failed uid root then unmonitor
if failed gid adm then unmonitor
/monit/debian/templates/smartmontools
@@ -0,0 +1,21 @@
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
 
check process smartd with pidfile /var/run/smartd.pid
group system
group smartd
start program = "/etc/init.d/smartmontools start"
stop program = "/etc/init.d/smartmontools stop"
if 5 restarts with 5 cycles then timeout
depend smartd_bin
depend smartd_rc
 
check file smartd_bin with path /usr/sbin/smartd
group smartd
include /etc/monit/templates/rootbin
 
check file smartd_rc with path "/etc/init.d/smartmontools"
group smartd
include /etc/monit/templates/rootbin
 
/monit/debian/templates/snmpd
@@ -0,0 +1,10 @@
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
 
check process snmpd with pidfile /var/run/snmpd.pid
start program = "/sbin/service snmpd start"
stop program = "/sbin/service snmpd stop"
if failed host localhost port 161 type udp then restart
if failed host localhost port 199 type tcp then restart
if 5 restarts within 5 cycles then timeout