Created
February 4, 2011 16:40
-
-
Save rafmagana/811337 to your computer and use it in GitHub Desktop.
Send notifications to Prowl on God events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
God.contact(:prowl) do |c| | |
c.name = 'your name' | |
c.apikey = 'your prowl api' | |
c.group = 'developers' | |
end | |
God.contact(:prowl) do |c| | |
c.name = 'another name' | |
c.apikey = 'another prowl api' | |
c.group = 'developers' | |
end | |
God.watch do |w| | |
#... | |
#a lot of things here | |
#... | |
w.transition(:up, :restart) do |on| | |
on.condition(:memory_usage) do |c| | |
c.interval = 20 | |
c.above = 100.megabytes | |
c.times = [3, 5] | |
c.notify = {:contacts => 'developers', | |
:priority => 2, | |
:category => "Thin #{instance_number} memory too high!"} | |
end | |
end | |
#Check priorities in line 45 of https://github.com/mojombo/god/blob/master/lib/god/contacts/prowl.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment