|
From: | sven falempin |
Subject: | Re: set alert and generated alerts |
Date: | Wed, 19 Jun 2013 11:42:51 -0400 |
Hi,
I am in the process of setting up monit to watch over a big amount of tomcats. The configurations are generated for each running tomcat and deposited in a conf.d. I run into two problems:
I tried to limit the amount of mails by including "but not on { instance, nonexist }", but it seems I still get a mail for each monitor/unmonitor for each check.
The second problem is that each mail contains the same $SERVICE. $ACTION is honored (changes between batches of mail).
The checks are grouped into a file per tomcat with a single check looking like:
---snip
check file xxxxxxxx-xxxxxxxxxx-xxx-xxxx-su1-slow-requests with path /opt/xxxx/xxxx-xxxxxxx/TomC/xxx-xxx-xxxx-su1/logs/slow-requests.log
group "xxxxxxxx-xxxxxxxxxx-xxx-xxxx-su1"
if match
"^.*OutOfMemoryError.*$"
then exec "/etc/monit/tools/tomcat-restart.sh /opt/xxxx/xxxx-xxxxxxx/TomC/xxx-xxx-xxxx-su1" as uid tomcat and gid tomcat
if match
"^.*SEVERE: All threads .* are currently busy.*$"
then exec "/etc/monit/tools/tomcat-restart.sh /opt/xxxx/xxxx-xxxxxxx/TomC/xxx-xxx-xxxx-su1" as uid tomcat and gid tomcat
set alert address@hidden but not on { instance }
mail-format {
from: address@hidden
subject: $SERVICE $EVENT at $DATE
message: Monit $ACTION $SERVICE at $DATE on $HOST: $DESCRIPTION.
best regards,
Hendrik Hasenbein
}
set mailserver x.24translate.de
---snap
The attached file contains a full group.
Thanks in advance,
Hendrik Hasenbein
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
[Prev in Thread] | Current Thread | [Next in Thread] |