Skip to content

Instantly share code, notes, and snippets.

@ymorimo
Created February 10, 2011 08:50
Show Gist options
  • Save ymorimo/820162 to your computer and use it in GitHub Desktop.
Save ymorimo/820162 to your computer and use it in GitHub Desktop.
def daemon_monitoring(w, options = {})
# ...
w.start_if do |start|
start.condition(:process_running) do |c|
c.interval = 30.seconds
c.running = false
c.notify = 'ymorimo'
end
end
# ...
end
# Notification settings
God::Contacts::Email.defaults do |d|
d.from_email = 'root@example.com'
d.from_name = 'God'
d.delivery_method = :sendmail
end
God.contact(:email) do |c|
c.name = 'ymorimo'
c.group = 'developers'
c.to_email = 'ymorimo+alert@example.com'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment