Re: Notification script in check program

"[email protected]" <[email protected]>
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <[email protected]>
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 <[email protected]> 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


-- 
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.