-
-
Save attackant/de5685126493de65925b1b76b217ee7e to your computer and use it in GitHub Desktop.
Basic monit config to monitor CPU, memory and disk usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set daemon 30 with start delay 60 | |
set logfile syslog facility log_daemon | |
set httpd port 2812 | |
allow localhost | |
set mailserver localhost | |
set alert [email protected] but not on { instance } | |
mail-format { | |
From: [email protected] | |
Subject: [$HOST] $EVENT $SERVICE | |
Message: $DESCRIPTION | |
$DATE | |
} | |
check system www.EXAMPLE.com | |
if loadavg (5min) > 3 for 4 cycles then alert | |
if loadavg (15min) > 1 for 4 cycles then alert | |
if memory usage > 80% for 4 cycles then alert | |
if swap usage > 20% for 4 cycles then alert | |
if cpu usage (user) > 80% for 4 cycles then alert | |
if cpu usage (system) > 20% for 4 cycles then alert | |
if cpu usage (wait) > 20% for 4 cycles then alert | |
check filesystem "root" with path /dev/sda1 | |
if space usage > 80% for 8 cycles then alert |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in /etc/monit/monitrc
sudo monit reload
sudo monit status