Message from discussion
Rewriting startup script to support prowl notifications example or docs?
Received: by 10.59.7.167 with SMTP id dd7mr2573548ved.26.1347908156829;
Mon, 17 Sep 2012 11:55:56 -0700 (PDT)
X-BeenThere: god-rb@googlegroups.com
Received: by 10.220.147.138 with SMTP id l10ls5081370vcv.7.gmail; Mon, 17 Sep
2012 11:55:56 -0700 (PDT)
Received: by 10.52.75.36 with SMTP id z4mr926415vdv.14.1347908156296;
Mon, 17 Sep 2012 11:55:56 -0700 (PDT)
Date: Mon, 17 Sep 2012 11:55:56 -0700 (PDT)
From: rubybox <voorr...@gmail.com>
To: god-rb@googlegroups.com
Message-Id: <56899ac9-99f4-4a6e-a5b0-57827a2c4517@googlegroups.com>
Subject: Rewriting startup script to support prowl notifications example or
docs?
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_1007_9906361.1347908156033"
------=_Part_1007_9906361.1347908156033
Content-Type: multipart/alternative;
boundary="----=_Part_1008_32683282.1347908156034"
------=_Part_1008_32683282.1347908156034
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
I have this code but find the docs on godrb site very unclear on how to
exactly add a notification with prowl, Is there some place to find full
documentation on how to implement this?
I have this script:
redis_root = "/usr/sbin"
# Redis
%w{6379}.each do |port|
God.watch do |w|
w.name = "redis"
w.interval = 30.seconds
w.start = "redis-server"
w.stop = "redis-cli -p #{port} shutdown"
w.restart = "#{w.stop} && #{w.start}"
w.start_grace = 10.seconds
w.restart_grace = 10.seconds
w.log = File.join(ENV['RAILS_ROOT'], 'log', 'redis.log')
w.start_if do |start|
start.condition(:process_running) do |c|
c.interval = 5.seconds
c.running = false
end
end
end
end
I would like to add prowl support to, so I get an push message on my Iphone
whenever this service is going down.
This is all that's listed on the godrb.com site,
Prowl
Send a notice to Prowl (<a
href="http://prowl.weks.net/">http://prowl.weks.net/</a>).
God::Contacts::Prowl.defaults do |d|
...end
God.contact(:prowl) do |c|
...end
apikey - The String API key.
------=_Part_1008_32683282.1347908156034
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
I have this code but find the docs on godrb site very unclear on how to exa=
ctly add a notification with prowl, Is there some place to find full docume=
ntation on how to implement this?<div><br></div><div>I have this script:</d=
iv><div><br></div><div><div>redis_root =3D "/usr/sbin"</div><div><br></div>=
<div># Redis</div><div>%w{6379}.each do |port|</div><div> God.watch d=
o |w|</div><div> w.name =3D "redis"</div><div> w.=
interval =3D 30.seconds</div><div> w.start =3D "redis-server"<=
/div><div> w.stop =3D "redis-cli -p #{port} shutdown"</div><di=
v> w.restart =3D "#{w.stop} && #{w.start}"</div><div>&=
nbsp; w.start_grace =3D 10.seconds</div><div> w.restart=
_grace =3D 10.seconds</div><div> w.log =3D File.join(ENV['RAIL=
S_ROOT'], 'log', 'redis.log')</div><div><br></div><div> w.star=
t_if do |start|</div><div> start.condition(:process_run=
ning) do |c|</div><div> c.interval =3D 5.seconds=
</div><div> c.running =3D false</div><div> =
end</div><div> end</div><div> end</div><d=
iv>end</div></div><div><br></div><div>I would like to add prowl support to,=
so I get an push message on my Iphone whenever this service is going down.=
</div><div><br></div><div>This is all that's listed on the godrb.com site,<=
/div><div><br></div><div><br></div><div><h3 id=3D"wiki-_prowl" style=3D"mar=
gin-top: 1.5em; margin-bottom: 0.5em; font-size: 1.25em; font-weight: bold;=
line-height: normal; font-family: 'Trebuchet MS', Verdana, Arial, Helvetic=
a, sans-serif; color: rgb(243, 110, 33); background-color: rgb(248, 248, 25=
5); ">Prowl</h3><div class=3D"paragraph" style=3D"color: rgb(72, 72, 72); f=
ont-family: 'Trebuchet MS', Verdana, Arial, Helvetica, sans-serif; line-hei=
ght: 19px; background-color: rgb(248, 248, 255); "><p>Send a notice to Prow=
l (<a href=3D"http://prowl.weks.net/">http://prowl.weks.net/</a>=
;).</p></div><div class=3D"paragraph" style=3D"color: rgb(72, 72, 72); font=
-family: 'Trebuchet MS', Verdana, Arial, Helvetica, sans-serif; line-height=
: 19px; background-color: rgb(248, 248, 255); "><div class=3D"highlight" st=
yle=3D"background-color: rgb(255, 255, 255); "><pre style=3D"margin-top: 1e=
m; margin-bottom: 1em; font-size: 1.2em; line-height: 1.3; border: 1px soli=
d rgb(204, 204, 204); padding: 1em; background-color: rgb(239, 239, 239); "=
><span class=3D"no" style=3D"font-size: 12px; color: rgb(0, 128, 128); ">Go=
d</span><span class=3D"o" style=3D"font-size: 12px; font-weight: bold; ">::=
</span><span class=3D"no" style=3D"font-size: 12px; color: rgb(0, 128, 128)=
; ">Contacts</span><span class=3D"o" style=3D"font-size: 12px; font-weight:=
bold; ">::</span><span class=3D"no" style=3D"font-size: 12px; color: rgb(0=
, 128, 128); ">Prowl</span><span class=3D"o" style=3D"font-size: 12px; font=
-weight: bold; ">.</span><span class=3D"n" style=3D"font-size: 12px; ">defa=
ults</span> <span class=3D"k" style=3D"font-size: 12px; font-weight: bold; =
">do</span> <span class=3D"o" style=3D"font-size: 12px; font-weight: bold; =
">|</span><span class=3D"n" style=3D"font-size: 12px; ">d</span><span class=
=3D"o" style=3D"font-size: 12px; font-weight: bold; ">|</span>
<span class=3D"o" style=3D"font-size: 12px; font-weight: bold; ">.</span>=
<span class=3D"n" style=3D"font-size: 12px; ">.</span><span class=3D"o" sty=
le=3D"font-size: 12px; font-weight: bold; ">.</span>
<span class=3D"k" style=3D"font-size: 12px; font-weight: bold; ">end</span>
<span class=3D"no" style=3D"font-size: 12px; color: rgb(0, 128, 128); ">God=
</span><span class=3D"o" style=3D"font-size: 12px; font-weight: bold; ">.</=
span><span class=3D"n" style=3D"font-size: 12px; ">contact</span><span clas=
s=3D"p" style=3D"font-size: 12px; ">(</span><span class=3D"ss" style=3D"fon=
t-size: 12px; color: rgb(153, 0, 115); ">:prowl</span><span class=3D"p" sty=
le=3D"font-size: 12px; ">)</span> <span class=3D"k" style=3D"font-size: 12p=
x; font-weight: bold; ">do</span> <span class=3D"o" style=3D"font-size: 12p=
x; font-weight: bold; ">|</span><span class=3D"n" style=3D"font-size: 12px;=
">c</span><span class=3D"o" style=3D"font-size: 12px; font-weight: bold; "=
>|</span>
<span class=3D"o" style=3D"font-size: 12px; font-weight: bold; ">.</span>=
<span class=3D"n" style=3D"font-size: 12px; ">.</span><span class=3D"o" sty=
le=3D"font-size: 12px; font-weight: bold; ">.</span>
<span class=3D"k" style=3D"font-size: 12px; font-weight: bold; ">end</span>
</pre></div></div><div class=3D"paragraph" style=3D"color: rgb(72, 72, 72);=
font-family: 'Trebuchet MS', Verdana, Arial, Helvetica, sans-serif; line-h=
eight: 19px; background-color: rgb(248, 248, 255); "><div class=3D"highligh=
t" style=3D"background-color: rgb(255, 255, 255); "><pre style=3D"margin-to=
p: 1em; margin-bottom: 1em; font-size: 1.2em; line-height: 1.3; border: 1px=
solid rgb(204, 204, 204); padding: 1em; background-color: rgb(239, 239, 23=
9); ">apikey - The String API key.</pre></div></div></div>
------=_Part_1008_32683282.1347908156034--
------=_Part_1007_9906361.1347908156033--