3

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
3
  • Shouldn't that be grep -r 92% /etc ? Do you have a "monit.conf" or "monitor" anywhere?
    – ewwhite
    Nov 24, 2014 at 8:31
  • Why 92%? 90% is the limit I want. I also want to get rid of alerts about 75% memory usage.
    – Hnatt
    Nov 24, 2014 at 8:39
  • I have a file named monit.conf in /etc/init, which I suppose sets up monit in sysvinit. It loads file /etc/init.d/monitrc, which in its turn loads and *.conf files in /erc/monit/conf.d. The one I pasted is /etc/monit/conf.d/system.conf. Others don't define any memory limits.
    – Hnatt
    Nov 24, 2014 at 8:51

1 Answer 1

5

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
1
  • edited again, added config file
    – Hnatt
    Nov 24, 2014 at 8:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .