monit-general
[Top][All Lists]
Advanced

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

Re: Notification script in check program


From: address@hidden
Subject: Re: Notification script in check program
Date: Fri, 22 Jun 2018 07:55:06 +0200

Hi Lutz,

you can use multiple status tests within the 'check program' - if the status 
differs on program success, the second status check should catch it, something 
like this:

 check program myprogram with path "/usr/local/bin/helloworld"
       if status = 0 then exec "/usr/local/bin/script_no_1"
       if status > 0 then exec "/usr/local/bin/script_no_2"

Best regards,
Martin


> On 21 Jun 2018, at 23:24, Lutz Mader <address@hidden> wrote:
> 
> Hello Tildeslash,
> I use "CHECK PROGRAM" to do some additional application checks.
> Based on the return code and an appropriate "IF STATUS" rule I send
> alert/mail notifications from Monit.
> 
> This works well in the past, but I try to use a script to send SMS
> notifications now. I get the "Status failed" alerts, but the "Status
> succeeded" can not send.
> 
> Any plan to make the a "IF SUCCEEDED THEN" available for the "CHECK
> PROGRAM" in the future or any suggestion how to get a succeed notification.
> 
> With regards,
> Lutz
> 
> p.s.
> A status check with 0 doesn't work, because the service get the status
> "Status failed" with that.
> 
> -- 
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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