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 | se...@crux.nu

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to