Hey José, Monick,

Thanks José! The correct way to do this is indeed to monitor yourself, and 
use the Scalr agent (or API) to trigger the event in Scalr when it 
happens.. 

We have an example script in a soon-to-be tutorial that shows how to do 
this using Monit; it's 
here: 
https://github.com/scalr-tutorials/monit-integration/blob/master/monit.configure.sh

(The way this works is we have a daemon that monitors the status of MySQL 
replication, and touches a file so long as replication works. If it fails, 
then the file is not updated, and monit will trigger szradm - see line 30 
of the script).



Another way to do this is to use the API. I updated the docs 
(http://wiki.scalr.com/x/aA1x) with that info.


Cheers,



On Friday, September 13, 2013 2:12:31 PM UTC+2, José Juan Montes wrote:
>
>
>
> I'd like to trigger a script based on a custom event (instead of Scalr 
>> events like HostUp etc.)
>> I can create a custom event, as described in this page: 
>> http://wiki.scalr.com/display/docs/Adding+Custom+Events
>> But I don't understand how is it possible for scalr to detect such 
>> events; in the example above, how can the system detect that Apache has 
>> been restarted?
>>
>
> At the bottom of the page it is said that you trigger events yourself 
> using the "szradm" tool:
>
>
> szradm --fire-event=YourCustomEvent param1=value1 param2=value2
>
> So you need to trigger the custom events yourself. In this case, you can 
> have some script checking Apache PID for instance, which triggers the event 
> when it is changed, or any other approach you like.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"scalr-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to