[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: set alert and generated alerts
From: |
Hendrik Hasenbein |
Subject: |
RE: set alert and generated alerts |
Date: |
Thu, 20 Jun 2013 12:08:51 +0200 |
Indeed. The new expression does work the way it is intended, but I still get
tons of identical emails (about the same amount as I have checks).
Is there a limit to the length of the check's name?
Thanks in advance,
Hendrik Hasenbein
-----Original message-----
From: sven falempin <address@hidden>
Sent: Wed 19-06-2013 17:44
Subject: Re: set alert and generated alerts
To: This is the general mailing list for monit <address@hidden>;
> "^.*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
> <mailto: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 <mailto: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 <http://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
> /\
>
> --
>
> To unsubscribe:
>
> https://lists.nongnu.org/mailman/listinfo/monit-general
>
>