Watch raid status with Monit

This commit is contained in:
Paul-Henri Froidmont 2022-09-09 04:53:16 +02:00
parent 430b78aa84
commit 912d58b8ee
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
2 changed files with 6 additions and 2 deletions

View file

@ -38,11 +38,11 @@ in
include ${config.sops.secrets.monitMailserverConfig.path}
set mail-format { from: monit@banditlair.com }
set alert alerts@banditlair.com
set alert alerts@banditlair.com with reminder on 120 cycles
check system $HOST
if cpu usage > 95% for 10 cycles then alert
if memory usage > 75% then alert
if memory usage > 75% for 5 times within 15 cycles then alert
if swap usage > 25% then alert
check filesystem root with path /
@ -50,6 +50,7 @@ in
check file daily-backup-done with path /nix/var/data/backup/backup-ok
if changed timestamp then alert
if timestamp > 26 hours then alert
${cfg.additionalConfig}
'';

View file

@ -64,6 +64,9 @@
if failed port 443 protocol https with timeout 20 seconds then alert
check host webmail with address webmail.banditlair.com
if failed port 443 protocol https with timeout 20 seconds then alert
check program raid-md127 with path "${pkgs.mdadm}/bin/mdadm --misc --detail --test /dev/md127"
if status != 0 then alert
'';
services.minecraft-server = {