From a65c9f88f190f92571363cb3dad75126d3a0f89b Mon Sep 17 00:00:00 2001 From: Monit Date: Sun, 5 Dec 2021 20:00:11 +0000 Subject: [PATCH] add monit config --- README.md | 0 etc-monit/monit.d/01_httpd.cfg | 6 ++++++ etc-monit/monit.d/02_alert.cfg | 6 ++++++ etc-monit/monit.d/99_checks.cfg | 37 +++++++++++++++++++++++++++++++++ etc-monit/monitrc | 26 +++++++++++++++++++++++ 5 files changed, 75 insertions(+) create mode 100644 README.md create mode 100644 etc-monit/monit.d/01_httpd.cfg create mode 100644 etc-monit/monit.d/02_alert.cfg create mode 100644 etc-monit/monit.d/99_checks.cfg create mode 100755 etc-monit/monitrc diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/etc-monit/monit.d/01_httpd.cfg b/etc-monit/monit.d/01_httpd.cfg new file mode 100644 index 0000000..8c1a18c --- /dev/null +++ b/etc-monit/monit.d/01_httpd.cfg @@ -0,0 +1,6 @@ +set httpd + port 2812 + allow 127.0.0.1 + allow "::1" + allow 192.168.178.0/24 + allow admin:buhNu0Oewais diff --git a/etc-monit/monit.d/02_alert.cfg b/etc-monit/monit.d/02_alert.cfg new file mode 100644 index 0000000..e235501 --- /dev/null +++ b/etc-monit/monit.d/02_alert.cfg @@ -0,0 +1,6 @@ +set alert arne@br0tkasten.de +set mailserver mail.lxc.br0tkasten.de using hostname monit.br0tkasten.de +set mail-format { + from: Monit Support +} +check system monit.br0tkasten.de diff --git a/etc-monit/monit.d/99_checks.cfg b/etc-monit/monit.d/99_checks.cfg new file mode 100644 index 0000000..9c3c1dc --- /dev/null +++ b/etc-monit/monit.d/99_checks.cfg @@ -0,0 +1,37 @@ +check host br0tkasten.de with address br0tkasten.de + if failed ping then alert + +check host git.br0tkasten.de with address git.br0tkasten.de + if failed port 443 protocol https then alert + if failed port 4848 protocol ssh then alert + +check host ha.br0tkasten.de with address ha.br0tkasten.de + if failed port 443 protocol https then alert + +check host jitsi.br0tkasten.de with address jitsi.br0tkasten.de + if failed port 443 protocol https then alert + +check host mail.br0tkasten.de with address mail.br0tkasten.de + if failed port 25 protocol smtp then alert + if failed port 143 protocol imap then alert + if failed port 443 protocol https then alert + +check host matrix.br0tkasten.de with address matrix.br0tkasten.de + if failed port 443 protocol https then alert + +check host motion.br0tkasten.de with address motion.br0tkasten.de + if failed port 443 protocol https then alert + +check host mrtg.br0tkasten.de with address mrtg.br0tkasten.de + if failed port 443 protocol https status = 401 then alert + +check host www.br0tkasten.de with address www.br0tkasten.de + if failed port 443 protocol https then alert + +check host www.familienhilfe-baeumler.de with address www.familienhilfe-baeumler.de + if failed port 443 protocol https then alert + +check host www.somachtstefaniedas.de with address www.somachtstefaniedas.de + if failed port 443 protocol https then alert + + diff --git a/etc-monit/monitrc b/etc-monit/monitrc new file mode 100755 index 0000000..4ab0608 --- /dev/null +++ b/etc-monit/monitrc @@ -0,0 +1,26 @@ +set daemon 300 +set pidfile /var/run/monit.pid +set idfile /var/.monit.id +set statefile /var/.monit.state +set limits { + programOutput: 512 B, + sendExpectBuffer: 256 B, + fileContentBuffer: 512 B, + httpContentBuffer: 1 MB, + networkTimeout: 5 seconds + programTimeout: 300 seconds + stopTimeout: 30 seconds + startTimeout: 30 seconds + restartTimeout: 30 seconds +} + +set ssl { + verify : enable, + selfsigned : allow +} + +set eventqueue + basedir /var/monit + slots 100 + +include /etc/monit/monit.d/*.cfg