I am trying to setup system performance alerts using Monit 5.14. I have created
several configuration files in /etc/monit.d like "cpu_alert" and "mem_alert".
Each of these files has a different mail-format section because I want the
subject of the alert mail to show which resource is being overloaded. So the
cpu_alert file looks like this:
set mail-format {
From: [email protected]
Subject: [$HOST] CPU $EVENT
Message: $DESCRIPTION
$DATE
}
check system $HOST
if cpu usage > 50% for 1 cycles then alert
And the mem_alert file looks like this:
set mail-format {
From: [email protected]
Subject: [$HOST] Memory $EVENT
Message: $DESCRIPTION
$DATE
}
check system dvoellab01corp
if memory usage > 20% for 1 cycles then alert
But when I tested this configuration by putting a high CPU and memory load on
the server all of the email alerts say that they are "CPU" alerts. It's like
monit is using only the mail-format definition from the cpu_alert file and
ignoring the mail-format from the mem_alert file. Has anyone seen this before?
How can I fix this? The reason that I am using multiple configuration files is
because I want to be able to use a different subject line and email destination
for each type of resource bottleneck.
________________________________
This message (including any attachments) is confidential and intended for a
specific individual and purpose. If you are not the intended recipient, please
notify the sender immediately and delete this message.
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general