monit-general
[Top][All Lists]
Advanced

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

Re: monit sms alert with script


From: Jose V Beneyto
Subject: Re: monit sms alert with script
Date: Fri, 14 Oct 2016 13:39:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

Hi Damjan,

On 14/10/16 13:19, Damjan wrote:

I have MONIT setup to send alarm on email.

I have now a script which send SMS but don't know how to implement that into MONIT to also get SMS not just email.


I hope that helps.
You can add an extra line to your setup to also execute a script:


... then alert

... then exec "/path/to/your/executable"

There are some examples using the 'exec' option: https://mmonit.com/wiki/Monit/ConfigurationExamples

Here is a string which I use in terminal to send SMS, how to implement that in MONIT to get also SMS alerts?

send-sms -u myusername -p mypassword mymobile0127466424 "Message on SMS - Monit Problem XYZ"


I'm not sure about extra arguments passed to your executable.
I prefer to use a wrapper script for these purposes, but this also may work:

... then alert

... then exec "/path/to/send-sms -u myusername -p mypassword mymobile0127466424 'Message on SMS - Monit Problem XYZ'"

Best regards,
-- 
Jose V Beneyto | address@hidden

reply via email to

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