Knowledge Base/Engine Yard Cloud Documentation/Monitor your Application

Monitor Application Uptime

Engine Yard
posted this on February 16, 2012 10:03 AM

Updated: March 14th, 2013

Monitoring your application's uptime is important for keeping your application highly available and knowing about application outages when they happen. Engine Yard Cloud provides the ability to monitor an application's external URLs to determine if the application is accessible.

To enable uptime monitoring for an environment:

  1. Add the FitterHappier gem.
  2. Update your environment.
  3. Add the monitored URL to Engine Yard Cloud.

Add the FitterHappier gem

FitterHappier provides actions for monitoring site and/or database availability. The FitterHappier monitoring controller disables unnecessary Rails features like sessions, layouts, and logging, for lightning-fast monitoring URIs. 

FitterHappier is packaged as a gem. (Previously FitterHappier was installed as a Rails plugin.)

Steps

  1. Add the fitter-happier gem to your Gemfile.

    gem 'fitter-happier' 
  2. Start your application in development mode and test the following URIs:

    curl localhost:3000/fitter_happier 
    FitterHappier Site Check Passed

    curl localhost:3000/fitter_happier/site_check
    FitterHappier Site Check Passed @ Wed, 17 Dec 2008 14:27:47 -0800

    curl localhost:3000/fitter_happier/site_and_database_check
    FitterHappier Site and Database Check Passed @ Wed, 17 Dec 2008 14:27:57 -0800
    Schema Version: 20081217141904

Update your environment

After FitterHappier has been successfully installed, commit the changes to your git repository and redeploy your application. Ensure deployment was successful by testing the same URIs from above.

Add the monitored URL to Engine Yard Cloud

You can monitor a single URL per environment. We suggest monitoring the URL http://yoursite.com/fitter_happier/site_and_database_check for optimal coverage.

Steps

  1. Login to your Engine Yard account.
  2. Select an environment by clicking the environment name.
  3. In the Environment page, click HTTP Monitoring.
  4. Add the URL you want to monitor in the URL to monitor text field.
  5. Click Add URL.

Engine Yard Cloud pings the URL you provided approximately every 2 minutes. If the application does not return a 200 OK HTTP response, an alert will be created and an email will be sent to the configured email address. When the application comes back online, an email will be sent to confirm availability.


If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.

 

Comments

User photo
Sports Technologies
Sports Technologies

Just an FYI, if you do it this way you may get an error on deploy since git assumes the vendor/plugins/fitter_happier/.git/ should be a git submodule but it isn't declared in any .gitsubmodule file.

March 28, 2012 07:44 AM
User photo
Jamie Miller
Engine Yard Inc.

Thank you for your feedback! We are currently working on updating this document to reflect that.  

April 02, 2012 11:12 AM
User photo
Keri Meredith
Engine Yard Inc.

Thanks again for your comment. We have updated this topic. kjm

May 10, 2012 03:36 PM
User photo
Michael Reinsch
speedlearning

Rails plugins are deprecated, is there no modern version of this for Rails 3?

February 19, 2013 02:33 AM
User photo
Tim Littlemore
Engine Yard Inc.

Hi Michael,

It looks like someone forked the repo and made a gem available here: https://rubygems.org/gems/fitter-happier

I will open an internal ticket to get our docs updated to reflect using that gem, thanks for pointing this out!

Thanks,

Tim

February 19, 2013 03:19 AM
User photo
Intl Gum
intlgum

not sure if anyone cares, but that nice zspencer forked gem afitter-happier references an invalid EY page as "See EngineYard's support guide on uptime monitoring for your rails application" (https://www.engineyard.com/support/guides/uptime_monitoring_for_you... != https://support.cloud.engineyard.com/entries/20996821-monitor-appli...).

 

Cheers,
Kevin

May 08, 2013 09:52 PM
User photo
Tasha Drew
Engine Yard Inc.

Thanks Kevin! I submitted a pull request.

--Tasha 

May 09, 2013 02:38 PM