mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Watch raid status with Monit
This commit is contained in:
parent
430b78aa84
commit
912d58b8ee
2 changed files with 6 additions and 2 deletions
|
|
@ -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}
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue