wwwhizz’ blog Blog about some tech, some linux, my MIDIbox SID, etc.

27Apr/091

Make monit send less email

Today I found some nice extensions in the monit configuration file.

If you only want an alert message sent for certain events and just for some services, then append the alert-statement with the following lines.

check process apache2 with pidfile /var/run/apache2.pid
alert myemail@adress.ext only on { timeout, nonexist }

Only and on are so called "noise keywords", ignored by Monit to make it more readable.

You can also setup to send alerts for all events except some by putting the word "not" ahead of the list. For example, if you want to receive alerts for all events except Monit instance events, you can write (note that the noise words 'but' and 'on' are optional):

check system myserver
alert foo@bar but not on { instance }

instead of:

alert myemail@adress.ext on { action
checksum
content
data
exec
gid
icmp
invalid
fsflags
nonexist
permission
pid
ppid
size
timeout
timestamp }

Some parts of this are taken from the Monit Documentation

Comments (1) Trackbacks (0)
  1. Thanks a lot! I installed monit on a new VPS and the fsflags notifications, which seem to be generated for no reason at all, have been driving me nuts.


Leave a Reply

No trackbacks yet.