Monit ignores memory usage threshold config

monitmonitoring

I installed Monit 5.6 from Ubuntu repositories to alert me about unusually high memory and CPU usages on my VPS. It turned out that 75% memory usage is rather usual for my setup, so I changed the line where the limit is set in file /etc/monit/conf.d/system.conf:

check system localhost
  ...
  if memory usage > 90% then alert

But now it alerts me both on 75% threshold and on 90%. I searched where else can it be set: grep 75% -r /etc/monit/, but got no matches. Is there any other places Monit stores its config files on default setup? Or is the 75% limit is somehow hard-coded in it? How can I disable it?

UPD: I tried both reloading and restarting monit after changes (didn't try to reboot the server though). My Monit version is:

# monit -V
This is Monit version 5.6
Copyright (C) 2001-2013 Tildeslash Ltd. All Rights Reserved.

And the config file:

check system localhost
  if loadavg (1min) > 4 then alert
  if loadavg (5min) > 3 then alert
  if memory usage > 90% then alert
  if cpu usage (user) > 70% for 5 cycles then alert
  if cpu usage (system) > 30% for 5 cycles then alert
  if cpu usage (wait) > 20% for 5 cycles then aler

Best Answer

There's always a chance there's a bug... Can you show your Monit version level?

# monit -V
This is Monit version 5.5
Copyright (C) 2001-2012 Tildeslash Ltd. All Rights Reserved.
  • Could you also post your Monit configuration file?
  • Did you restart the Monit service after making your configuration change?

You can do this with:

service monit restart or just monit reload

If in doubt about the readings, you can run monit status from the command line:

[root@PMS ~]# monit status
The Monit daemon 5.5 uptime: 6d 14h 26m

    System 'PMS.pmscollects.com'
      status                            Running
      monitoring status                 Monitored
      load average                      [0.00] [0.11] [0.38]
      cpu                               0.0%us 0.2%sy 0.0%wa
      memory usage                      3562600 kB [44.2%]
      swap usage                        5280 kB [0.0%]
      data collected                    Sun, 23 Nov 2014 23:59:04