Last Resort is a Ruby gem for monitoring critical emails sent by automated services ("Server down!", "Resource limit matched!", etc.) and calling your phone to tell you about it. It can be deployed in a reliable environment and perform up to 1500 emergency calls for free, using the free and trial tiers available from context.io, twilio and heroku.
Installation
$ gem install last-resort
Getting started
$ last-resort new my-awesome-project
This will create a scheduling project with a sample my-awesome-project/config.rb
file.
Example config.rb file
configure :host => "",
:twilio_sid => "",
:twilio_auth_token => "",
:contextio_account => "",
:contextio_key => "",
:contextio_secret => ""
# DEFINE YOUR CONTACTS
contact :ian, ""
contact :scott, ""
contact :victor, ""
# DEFINE WHAT EMAILS YOU WANT TO WATCH FOR
match :subject => /server down/ # rackspace ping
match :subject => /resource limit reached/ # monit
# DEFINE WHO TO CALL AND WHEN
between 19..22, :on => [:wednesday, :thursday] do
call :victor
end
between :off_hours, :on => :weekdays do
call :scott
end
between :all_hours, :on => :weekends do
call [:ian, :scott, :victor]
end
Credit
Victor Mota (@vimota)
Scott Hyndman (@scotthyndman)
Ian Ha (@ianpha)