Skip to content

Instantly share code, notes, and snippets.

@kimus
Created June 5, 2015 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kimus/3fba594805a48b4ff718 to your computer and use it in GitHub Desktop.
Save kimus/3fba594805a48b4ff718 to your computer and use it in GitHub Desktop.
Monit
set alert usera@example.com
set mailserver smtp.gmail.com port 587
username "user@gmail.com"
password "password"
using TLSV1
with timeout 30 seconds
set mail-format {
from: monit@server.example.com
reply-to: user@example.com
subject: [MONIT] $SERVICE $EVENT at $DATE
message: Monit $ACTION $SERVICE at $DATE on $HOST: $DESCRIPTION.
Yours sincerely,
monit
}
check filesystem rootfs path /dev/xvda1
if space usage > 80% for 5 times within 15 cycles then alert
if space usage > 90% for 5 cycles then exec '/some/path/autoclean.sh'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment