From 529478307de8dc2db5a89c23abc7af982d76f33f Mon Sep 17 00:00:00 2001 From: kev Date: Thu, 2 Jul 2015 19:50:46 +0800 Subject: [PATCH] update --- monit/monit/conf.d/network.cfg | 4 ++++ monit/monit/conf.d/{settings.cfg => setting.cfg} | 2 +- monit/monit/conf.d/system.cfg | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 monit/monit/conf.d/network.cfg rename monit/monit/conf.d/{settings.cfg => setting.cfg} (60%) create mode 100644 monit/monit/conf.d/system.cfg diff --git a/monit/monit/conf.d/network.cfg b/monit/monit/conf.d/network.cfg new file mode 100644 index 0000000..0a61565 --- /dev/null +++ b/monit/monit/conf.d/network.cfg @@ -0,0 +1,4 @@ +check network eth0 with interface eth0 + if upload > 500 kB/s then alert + if total download > 3 GB in last 2 hours then alert + if total download > 30 GB in last day then alert diff --git a/monit/monit/conf.d/settings.cfg b/monit/monit/conf.d/setting.cfg similarity index 60% rename from monit/monit/conf.d/settings.cfg rename to monit/monit/conf.d/setting.cfg index fd84571..7f95bcb 100644 --- a/monit/monit/conf.d/settings.cfg +++ b/monit/monit/conf.d/setting.cfg @@ -1,3 +1,3 @@ set httpd port 2812 and use address 0.0.0.0 - allow admin:monit + allow admin:monit readonly diff --git a/monit/monit/conf.d/system.cfg b/monit/monit/conf.d/system.cfg new file mode 100644 index 0000000..2733eda --- /dev/null +++ b/monit/monit/conf.d/system.cfg @@ -0,0 +1,8 @@ +check system ss.datageek.info + if loadavg (1min) > 4 then alert + if loadavg (5min) > 2 then alert + if memory usage > 80% then alert + if swap usage > 25% then alert + if cpu usage (user) > 70% then alert + if cpu usage (system) > 30% then alert + if cpu usage (wait) > 20% then alert