Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

NewRelic monitoring setup

Sri Maurya Kummamuru edited this page Jan 20, 2021 · 3 revisions
Warning: This page is going to be retired and this documentation will be maintained at - https://github.com/OpenConceptLab/ocl-docs/

Overview

OCL_WEB and OCLAPI applications are monitored on NewRelic, which is a great monitoring tool providing a dashboard and measuring things like page load times and execution times for Django views as well:

Dashboard

Setting up a server to monitor pretty straightforward, please see the guide at: https://rpm.newrelic.com/accounts/1409281/servers/get_started

Also, in order get access to monitoring, please contact Jon Payne.

In summary, for setting up:

  • Install a newrelic daemon on the server
  • Provide the newrelic agent the API key provided by NewRelic
  • Start the agent
  • Start your application through newrelic agent.

Reporting to NewRelic on ocl_web and oclapi are setup differently:

ocl_web

The setup here is more straight forward

  • Each of the Showcase, Staging and Production servers have daemon and agent installed
  • Each of the servers mentioned above have a newrelic configuration file located at /home/root/newrelic.ini that includes the application name as OCL WEB and the API key
  • ocl_web's manage.py starts the web server configured to report to newrelic if the environment is Showcase, Staging or Production
  • If newrelic's API key changes, newrelic.ini file must be updated accordingly and newrelic agent be restarted along with ocl_web redeployed

oclapi

This one is a bit more complicated since Django application that is oclapi is run in a Docker container

  • NEW_RELIC_API_KEY is an environment variable in the pipeline which is provided to the Docker container
  • Docker image is built with newrelic daemon and the agent. Also newrelic-api.ini file is created at this point.
  • oclapi's manage.py starts the server according to the configuration, if settings is one of Staging or Production
  • If newrelic's API key changes, NEW_RELIC_API_KEY environment variable must be updated on the pipeline and oclapi be redeployed
Clone this wiki locally