Yes. That worked! Not immediately but then it worked.
At first I had to enable the http interface which is the only way to pass commands to monit daemon
Then I had to stop the daemon, remove the state file (in my case /var/.monit.state) and then restart monit otherwise the service was always on not_monitored state (strange, uh?)
Maurizio
From: Alexander Yohananov <address@hidden>
To: This is the general mailing list for monit
<address@hidden>
Sent: Sat, January 1, 2011 12:06:27 PM
Subject: Re: Send SMS and unmonitor
What about of putting 'monit unmonitor my_service' somewhere at the end of your
send_sms script?
On Sat, Jan 1, 2011 at 11:30 AM, Maurizio Firmani
<address@hidden> wrote:
Hi all,
I'm just started to use monit (in daemon mode).
I would like to setup monit to send an sms alert instead of an email. I read that I can do this using the EXEC action to execute a script which will send the sms. So far so good. The problem is that I need to unmonitor the service otherwise monit will execute such an action at every checking cycle (and I will run out of all available sms in a few minutes!). I would like to do something like:
if error the exec "send_sms" and unmonitor
but it seems it is not possible to execute 2 action on the same condition.
Any advice?
TIA
Maurizio
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general