Project

flying

0.0
No commit activity in last 3 years
No release in over 3 years
Verifies if each given server is not down.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
 Project Readme

Flying is a tool for monitoring websites and apps. It was designed to be as simple as Gemfiles.

###Getting started

Install the gem:

gem install flying

Create a Ruby file anywhere with the following content:

# flying.rb
require "flying"

site "http://www.google.com"
site "http://www.nytimes.com"

start # starts monitoring

Now, just run in your terminal:

ruby flying.rb

Whenever one of those two sites gets offline, Flying will warn you and stop monitoring.

###Goal of the project

We want to be able to use the following DSL:

require "flying"

# Defines the interval between verifications
timer 1

# Send an email if any error occured
notify_me :email => "email@gmail.com"

# When an error happens, monitoring stops. :on_error_continue
# makes Flying ignore the error and continue monitoring.
site "http://www.google.com", :as => :google, :on_error => :continue

# If :google is down (above, :as => :google), Flying will notify the related services,
# e.g. 'www.mysite.com is probably not working properly because :google is offline'
site "http://www.mysite.com", :depends_on => :google

# Besides checking site availability, makes sure the response.body is a valid XML,
# ideal for making sure 3rd-party webservices are working.
site "http://www.fedex.com/webservice", :format => :xml

# Logs to the server via SSH, goes to a Rails app directory and do the following:
#
# - Reads production.log file and checks if any error happened (e.g. Errno... )
# - Looks for config/database.yml and tries connecting to all possible DBs, except
#   'development' and 'test'
rails_app "ssh://kurko@google.com", :path => "/var/rails/google"

start

###License

License is MIT. If you're gonna improve this project, please collaborate and send a pull request.