Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got Monit configuration with:

check system
    if loadavg (1min) > 4 then alert
    if loadavg (5min) > 2 then alert

I want to get rid of messages every time backup is running at night, but I do not want to turn it off completely.

How to add check for gzip/bzip2 process runing like:

`ps aux | grep '\[gb\]zip'`

or disable that one check at some time?

share|improve this question
up vote 6 down vote accepted

You can tell Monit to stop monitoring during certain times (ie while your backup is running). It uses the same syntax as cron. There are good examples in Monit Documentation in the Service Poll Times section. You probably want something like:

check system
not every "* 2-4 * * *"

This will stop monitoring every night from 2am-4am

share|improve this answer
Error: syntax error 'not'. Any ideas? – Jacek Kaniuk Dec 13 '11 at 6:51
working with last version monit (I've got stable Debian with slightly older one) – Jacek Kaniuk Dec 17 '11 at 15:09

You should "unmonitor" the system load check during the backup interval.

monit unmonitor

You can do this for a specific duration with an at script or just cron, if you know your backup window time.

Resume the monitoring after the backup window:

monit monitor

share|improve this answer
That sounds good but I've got problem with it (root, shell): # monit unmonitor monit: action failed -- You are <b>not</b> authorized to access <i>monit</i>. Either you supplied the wrong credentials (e.g. bad password), or your browser doesn't understand how to sup – Jacek Kaniuk Oct 4 '11 at 11:46
What's the output of monit status ? – ewwhite Oct 4 '11 at 12:02
monit: cannot read status from the monit daemon. Monit listens on 0 and is not blocked on firewall or anything – Jacek Kaniuk Oct 4 '11 at 12:17
status, unmonitor etc. are "Optional action arguments for non-daemon mode", but my monit runs as daemon – Jacek Kaniuk Oct 4 '11 at 12:22

Stop monit when run backup.

  /usr/local/etc/rc.d/monit stop backup...
  /usr/local/etc/rc.d/monit start
share|improve this answer
that replace one problem with another:… – Jacek Kaniuk Oct 4 '11 at 12:27
it works with set alert but not on { instance } – Jacek Kaniuk Oct 4 '11 at 12:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.