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:
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
-
Add the fitter-happier gem to your Gemfile.
gem 'fitter-happier'
-
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
- Login to your Engine Yard account.
- Select an environment by clicking the environment name.
- In the Environment page, click HTTP Monitoring.
- Add the URL you want to monitor in the URL to monitor text field.
- 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.
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.
Thank you for your feedback! We are currently working on updating this document to reflect that.
Thanks again for your comment. We have updated this topic. kjm
Rails plugins are deprecated, is there no modern version of this for Rails 3?
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
not sure if anyone cares, but that nice zspencer forked gem at fitter-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_your_rails_application != https://support.cloud.engineyard.com/entries/20996821-monitor-application-uptime).
Cheers,
Kevin
Thanks Kevin! I submitted a pull request.
--Tasha
As another option https://github.com/ianheggie/health_check can used to configure a health check path that also attempts to verify connectivity to multiple aspects of your application such as sidkiq or redis