You need to sign in or sign up before continuing.
Add newrelic monitoring for instances
Created by: omarkhan
This pull request adds New Relic monitoring for instances. Monitoring is activated for new app servers by setting the NEWRELIC_LICENSE_KEY
and NEWRELIC_ADMIN_USER_API_KEY
settings.
App and server monitoring is activated if NEWRELIC_LICENSE_KEY
is set, and is configured using the following ansible vars:
-
COMMON_ENABLE_NEWRELIC
for server monitoring -
COMMON_ENABLE_NEWRELIC_APP
for app monitoring -
COMMON_ENVIRONMENT
global prefix for instances in the newrelic UI -
COMMON_DEPLOYMENT
instance-specific prefix in the newrelic UI NEWRELIC_LICENSE_KEY
Availability monitoring using Synthetics is activated if the NEWRELIC_ADMIN_USER_API_KEY
is set. Monitors are created when an app server is activated, and removed when an instance is deleted. Email alerts are set up for email addresses in the ADMINS
list.
Testing
- Deploy this branch to stage
- Provision a new instance
- Open the LMS and Studio to cause data to be sent to New Relic
- Go to the New Relic applications page. The LMS, Studio, workers and xqueue for your instance should all be monitored
- Go to the Synthetics page. Availability monitors should be set up for the LMS, Studio, and LMS preview urls
- Open each monitor and click on 'Alert notifications'. ops@opencraft.com should be in the notifications list
- Kill the LMS and/or Studio for your instance. After a while an email alert should be sent to ops@opencraft.com
- Delete the instance
- Check that the Synthetics monitors have been removed