monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set alert and generated alerts


From: sven falempin
Subject: Re: set alert and generated alerts
Date: Wed, 19 Jun 2013 11:42:51 -0400

"^.*OutOfMemoryError.*$"

this doesnt make sense to me :)

your _expression_ should be "OutOfMemoryError"
Same for the rest, 
beware that monit probably dont use pure perl regexp
so it may be greedy

may explain why you receive fake mail.



On Tue, Jun 18, 2013 at 7:00 AM, Hendrik Hasenbein <address@hidden> wrote:
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



--
---------------------------------------------------------------------------------------------------------------------
() ascii ribbon campaign - against html e-mail 
/\ 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]