Would it be possible to do multiple notifications?
Cannot get it to work, I need mail + prowl only 1 at the time works.


Ive created a simple.rb deamon to test with this code:


God::Contacts::Email.defaults do |d|
>
>   d.from_email = '[email protected]'
>
>   d.from_name = 'Monitor'
>
>   d.delivery_method = :smtp
>
>   d.server_host = 'host.com'
>
>   d.server_auth = true
>
>   d.server_domain = 'host.com'
>
>   d.server_user = '[email protected]'
>
>   d.server_password = 'pass'
>
>  end
>
>
> God.contact(:email) do |c|
>
>   c.name = 'me'
>
>   c.group = 'system'
>
>   c.to_email = '[email protected]'
>
> end
>
>
> God.contact(:prowl) do |p|
>
>    p.name = 'xxx'
>
>    p.apikey = 'xxx'
>
> end
>
>
>
> God.watch do |w|
>
>   w.name = "simple"
>
>   w.interval = 5.seconds
>
>   w.start = "ruby /tmp/simple.rb"
>
>   w.keepalive
>
>   w.start_grace   = 10.seconds 
>
>   w.restart_grace = 10.seconds 
>
>     
>
>
>  w.transition(:init, { true => :up, false => :start }) do |on|
>
>     on.condition(:process_running) do |c|
>
>       c.running = true
>
>     end
>
>   end
>
>
>   # determine when process has finished starting
>
>   w.transition([:start, :restart], :up) do |on|
>
>     on.condition(:process_running) do |c|
>
>       c.running = true
>
>     end
>
>   end
>
>   
>
>   # start if process is not running
>
>   w.transition(:up, :start) do |on|
>
>     on.condition(:process_exits)
>
>   end
>
>   
>
>   # # bind the notification via mail when some problems occours
>
>   w.transition(:up, :start) do |on|
>
>     on.condition(:process_exits) do |p|
>
>       p.notify = 'xxx'
>
>     end
>
>   end
>
>
> end
>

-- 
You received this message because you are subscribed to the Google Groups 
"god.rb" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/god-rb/-/JFsIZ6-Hb_kJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/god-rb?hl=en.

Reply via email to