monit-general
[Top][All Lists]
Advanced

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

Re: Another feature


From: Andrew Holt
Subject: Re: Another feature
Date: Sat, 11 Sep 2010 20:02:56 +0100

Hi,

I am trying this:

check host acs1 with address acs1
    if failed icmp type echo count 4 with timeout 15 seconds
        then exec "/root/Scripts/alert.sh ping"

If I pull the ethernet connection to ascs1 then sure enough the script runs.

However, I get the message multiple times.  Does 'alert' do something like set 
a fail flag against the monitored object, which it later clears when the fault 
is rectified ?


Thanks,
Andrew



On 11 Sep 2010, at 13:49, Martin Pala wrote:

> Hi,
> 
> you can use exec action instead of alert:
> 
> check device root with path /
>     if space usage > 89% then exec "/root/Scripts/alert.sh" else if succeeded 
> then exec "/root/Scripts/alert.sh"
> 
> Upcoming M/Monit-2.3 also allows to set rules for events which allow to 
> execute custom program (in addition to email and instant message). We use it 
> to collect events from all monit hosts and pass the event to text-to-speach 
> program so we can hear what happened if event arrives (in practice it is 
> pretty cool :), it is also possible to execute snmptrap, etc.
> 
> Martin
> 
> 
> On Sep 11, 2010, at 2:33 PM, Andrew Holt wrote:
> 
>> 
>> Hi,
>> 
>> One other thing I would like to be able to do
>> 
>> e.g.
>> 
>> check device root with path /
>>   if space usage > 89% then alert
>>   else if succeeded then alert
>> 
>> And alert sends a mail.  What would be useful is
>> 
>> set alert_action exec "/root/Scripts/alert.sh"
>> 
>> Where the default is:
>> 
>> set alert_action email
>> 
>> 
>> 
>> =============================
>> Andrew Holt
>> 
>> Email: address@hidden
>> 
>> De Omnibus Dubitandum
>> =============================
>> 
>> 
>> 
>> 
>> --
>> To unsubscribe:
>> http://lists.nongnu.org/mailman/listinfo/monit-general
> 
> 
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general
> 

=============================
Andrew Holt

Email: address@hidden

De Omnibus Dubitandum
=============================






reply via email to

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