hilfe mein git ist komisch

This commit is contained in:
cutemeli
2026-01-08 18:34:49 +01:00
parent 710537a25d
commit b2d2dce845
4644 changed files with 94994 additions and 1763 deletions

View File

@@ -0,0 +1,16 @@
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

View File

@@ -0,0 +1,17 @@
check process apache with pidfile /var/run/apache2/apache2.pid
group www
group apache
start program = "/etc/init.d/apache2 start"
stop program = "/etc/init.d/apache2 stop"
if 4 restarts within 20 cycles then timeout
if failed host localhost port 80 with protocol http and request "/server-status" with timeout 25 seconds for 4 times within 5 cycles then restart
depend apache_bin
depend apache_rc
check file apache_bin with path /usr/sbin/apache2
group apache
include /etc/monit/templates/rootbin
check file apache_rc with path /etc/init.d/apache2
group apache
include /etc/monit/templates/rootbin

View File

@@ -0,0 +1,16 @@
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

View File

@@ -0,0 +1,23 @@
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

View File

@@ -0,0 +1,21 @@
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

View File

@@ -0,0 +1,19 @@
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

View File

@@ -0,0 +1,18 @@
check process mysqld with pidfile /var/run/mysqld/mysqld.pid
group database
group mysql
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
if failed host localhost port 3306 protocol mysql with timeout 15 seconds for 3 times within 4 cycles then restart
if failed unixsocket /var/run/mysqld/mysqld.sock protocol mysql for 3 times within 4 cycles then restart
if 5 restarts with 5 cycles then timeout
depend mysql_bin
depend mysql_rc
check file mysql_bin with path /usr/sbin/mysqld
group mysql
include /etc/monit/templates/rootbin
check file mysql_rc with path /etc/init.d/mysql
group mysql
include /etc/monit/templates/rootbin

View File

@@ -0,0 +1,17 @@
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

View File

@@ -0,0 +1,16 @@
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

View File

@@ -0,0 +1,35 @@
check process sshd matching /usr/sbin/sshd
group system
group sshd
start program = "/usr/bin/systemctl start ssh"
stop program = "/usr/bin/systemctl stop ssh"
if failed host localhost port 22 with proto ssh then restart
if 5 restarts with 5 cycles then timeout
depend on sshd_bin
depend on sftp_bin
depend on sshd_rc
depend on sshd_rsa_key
check file sshd_bin with path /usr/sbin/sshd
group sshd
include /etc/monit/templates/rootbin
check file sftp_bin with path /usr/lib/openssh/sftp-server
group sshd
include /etc/monit/templates/rootbin
check file sshd_rsa_key with path /etc/ssh/ssh_host_rsa_key
group sshd
include /etc/monit/templates/rootstrict
check file sshd_ecdsa_key with path /etc/ssh/ssh_host_ecdsa_key
group sshd
include /etc/monit/templates/rootstrict
check file sshd_ed25519_key with path /etc/ssh/ssh_host_ed25519_key
group sshd
include /etc/monit/templates/rootstrict
check file sshd_rc with path /etc/ssh/sshd_config
group sshd
include /etc/monit/templates/rootrc

View File

@@ -0,0 +1,18 @@
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

View File

@@ -0,0 +1,44 @@
check process postfix with pidfile /var/spool/postfix/pid/master.pid
group system
group mail
group postfix
start program = "/etc/init.d/postfix start"
stop program = "/etc/init.d/postfix stop"
if failed host localhost port 25 with protocol smtp for 2 times within 3 cycles then restart
if 5 restarts with 5 cycles then timeout
depend master_bin
depend postfix_rc
depend postdrop_bin
depend postqueue_bin
depend master_cf
depend main_cf
check file master_bin with path /usr/lib/postfix/sbin/master
group postfix
include /etc/monit/templates/rootbin
check file postdrop_bin with path /usr/sbin/postdrop
group postfix
if failed checksum then unmonitor
if failed permission 2555 then unmonitor
if failed uid root then unmonitor
if failed gid postdrop then unmonitor
check file postqueue_bin with path /usr/sbin/postqueue
group postfix
if failed checksum then unmonitor
if failed permission 2555 then unmonitor
if failed uid root then unmonitor
if failed gid postdrop then unmonitor
check file master_cf with path /etc/postfix/master.cf
group postfix
include /etc/monit/templates/rootrc
check file main_cf with path /etc/postfix/main.cf
group postfix
include /etc/monit/templates/rootrc
check file postfix_rc with path /etc/init.d/postfix
group postfix
include /etc/monit/templates/rootbin

View File

@@ -0,0 +1,21 @@
check process rsyslogd matching /usr/sbin/rsyslogd
group system
group rsyslogd
start program = "/usr/bin/systemctl start rsyslog"
stop program = "/usr/bin/systemctl stop rsyslog"
if 5 restarts with 5 cycles then timeout
depend on rsyslogd_bin
depend on rsyslog_file
check file rsyslogd_bin with path /usr/sbin/rsyslogd
group rsyslogd
include /etc/monit/templates/rootbin
check file rsyslog_file with path /var/log/syslog
group rsyslogd
# Note: activate the immark plugin for rsyslog if
# your system is too low on events.
if timestamp > 65 minutes then alert
if failed permission 640 then unmonitor
if failed uid root then unmonitor
if failed gid adm then unmonitor

View File

@@ -0,0 +1,16 @@
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

View File

@@ -0,0 +1,6 @@
check process snmpd with pidfile /var/run/snmpd.pid
start program = "/etc/init.d/snmpd start"
stop program = "/etc/init.d/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