/etc/monitrc
# Vérifie qu'un site est accessible
check host chezmoi.tld with address chezmoi.tld
if failed port 80 protocol http for 2 cycles then alert
if failed port 443 protocol https for 2 cycles then alert
# alerte si le certificat SSL arrive à expiration
if failed
port 443
with protocol https
and certificate valid > 30 days
use ssl options {verify: enable}
then alert
# Disponibilité du serveur mail
check host chezmoi.tld with address chezmoi.tld
if failed port 25 with protocol smtp for 2 cycles then alert
# ressources utilisées
check system localhost
if cpu > 75% for 2 cycles then alert
if memory usage > 75% then alert
if swap usage > 30% then alert
if disk read > 10 MB/s for 2 cycles then alert
check filesystem rootfs with path /
if space usage > 90% then alert
check filesystem var with path /var
if space usage > 90% then alert