monit-general
[Top][All Lists]
Advanced

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

Re: no email on resource limit passed


From: Martin Pala
Subject: Re: no email on resource limit passed
Date: Fri, 10 Nov 2006 13:34:25 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060915)

Hi,

when you set the use the global 'set alert ...', it will receive alert on all events (thus monit will perform the exec action and send alert to inherited recipient). You can register just subset of events if you want to as described in monit manual (http://www.tildeslash.com/monit/doc/manual.php#setting_a_local_alert_statement), thus omitting the 'resource' type will fix the issue (it will be handled by the exec action).

Martin

abdoul wrote:
Hi

I tried the following :
if memory usage > 75% then exec "/home/nextone/sendEmail.sh memory_usage>75%"

but im receiving Monit email alert + root sendEmail alert + passed alert ... any chance to disable monit's alerts at all? or shall i just disable the : set alert address@hidden <mailto:address@hidden> in /etc/monit.conf ?


ps: i know it's out of this ML subject but is there anyway to set the FROM email address, if im sending an email from a script using the "mail" command, to something specific like address@hidden <mailto:address@hidden> - right now it's from: root <address@hidden <mailto:address@hidden>> i've created a .mailrc and entered : set from=" address@hidden <mailto:address@hidden>" but no chance to have it working.

any help will be much appreciated.

thanks
ab

On 02/11/06, *Martin Pala * <address@hidden <mailto:address@hidden>> wrote:

    There is no support for just failure e-mails in monit currently ... i
    think you can use the monit's 'exec' action.

    This way you can start simple script which will send you the message
    just on failure.

    Example:

    --8<--
      check device rootfs with path /
       if space usage > 90% then exec "/send/me/alert.sh"
    --8<--

    Martin

    abdoul wrote:
     > Yes this is exactly what i would like to do - fair enough to
    receive 1st
     > alert so we can check right away, but the second one could be skipped
     >
     > thx
     > ab
     >
     > On 02/11/06, * Jonathan Dance* <address@hidden
    <mailto:address@hidden> <mailto: address@hidden
    <mailto:address@hidden>>>
     > wrote:
     >
     >     I think what he means is only receiving the "failure"
    e-mails, not the
     >     "recovery" e-mails. For every event where automated recovery
    occurs,
     >     monit sends two e-mails. I might also be interested in such a
    setting
     >     for use with SMS notifications.
     >
     >     On 11/2/06, Martin Pala < address@hidden
    <mailto:address@hidden>
     >     <mailto:address@hidden
    <mailto:address@hidden>>> wrote:
     >      > You can use the option of the alert statement to register just
     >     subset of
     >      > events for alert. Excerpt from monit manual:
     >      >
     >      > --8<--
     >      > Event filtering can be used to send a mail to different email
     >      > addresses depending on the events that occurred. For instance:
     >      >
     >      >   alert address@hidden { nonexist, timeout, resource, icmp,
    connection }
     >      >   alert address@hidden on { checksum, permission, uid, gid }
     >      >   alert address@hidden
     >      > --8<--
     >      >
     >      > See monit manual for more info.
     >      >
     >      > Cheers,
     >      > Martin
     >      >
     >      > abdoul wrote:
     >      > > Hello
     >      > >
     >      > > I wonder if it's possible to disable the alert email when
     >     resource limit
     >      > > is passed.
     >      > >
     >      > > Thanks
     >      > > AB
     >      >
     >      >
     >      >
     >      > --
     >      > To unsubscribe:
     >      > http://lists.nongnu.org/mailman/listinfo/monit-general
    <http://lists.nongnu.org/mailman/listinfo/monit-general>
     >      >
     >
     >
     >     --
     >     To unsubscribe:
     >     http://lists.nongnu.org/mailman/listinfo/monit-general
     >
     >
     >
     >
    ------------------------------------------------------------------------
     >
     > --
     > To unsubscribe:
     > http://lists.nongnu.org/mailman/listinfo/monit-general
    <http://lists.nongnu.org/mailman/listinfo/monit-general>


    --
    To unsubscribe:
    http://lists.nongnu.org/mailman/listinfo/monit-general



------------------------------------------------------------------------

--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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