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: Damjan
Subject: RE: monit sms alert with script
Date: Fri, 14 Oct 2016 13:44:40 +0200

Thank you

I have already tried that but monit won't even start if I use this

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

 

I also hope if there is possible to use variable for defined alarm in

The end of my string 'Message on SMS - Monit Problem XYZ'

Like Ā»monit apache alarmĀ«

 

regards

 

From: monit-general [mailto:address@hidden On Behalf Of Jose V Beneyto
Sent: Friday, October 14, 2016 1:39 PM
To: address@hidden
Subject: Re: monit sms alert with script

 

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]