Monday, 3 June 2013

Drupal 7 - Installing and configuring New Relic monitoring agents on all appliances

The New Relic (http://newrelic.com/) monitoring agent runs as a daemon process on a machine, collects performance and usage information, and reports it back for graphing and notification / alerts. The service also supports configurable URL monitoring.

New Relic Installation Steps:

  1. wget -O /etc/apt/sources.list.d/newrelic.list http://download.newrelic.com/debian/newrelic.list
  2. apt-key adv --keyserver hkp://subkeys.pgp.net --recv-keys 548C16BF
  3. apt-get update
  4. apt-get install newrelic-php5 newrelic-sysmond
  5. newrelic-install install sed -i 's/newrelic.license="."/newrelic.license="c3b93294767eer3e3e23d54e9cf37853702ded4a9b4f1"/' /etc/php5/conf.d/newrelic.ini
  6. nrsysmond-config --set license_key=c3b93294767eer3e3e23d54e9cf37853702ded4a9b4f1
  7. sudo service newrelic-sysmond start
  8. sudo service apache2 restart  

Steps to Install NewRelic PHP Agent

  1. SSH into the Server using Shell Script
    1. ssh "server name"
  2. Login as Sudo user, perform all the steps as super admin
    1. sudo su
  3. Type the following commands in Shell script
  4. wget -O /etc/apt/sources.list.d/newrelic.list http://download.newrelic.com/debian/newrelic.list
  5. apt-key adv --keyserver hkp://subkeys.pgp.net --recv-keys 548C16BF
  6. apt-get update
  7. apt-get install newrelic-php5 newrelic-sysmond
  8. newrelic-install install
    1. In this step it will ask for license key, please enter the license key provided.
    2. sed -i 's/newrelic.license="."/newrelic.license="c3b93294767ee23d54e9cf37853702ded4a9b4f1"/' /etc/php5/conf.d/newrelic.ini
    3. nrsysmond-config --set license_key=c3b93294767ee23d54e9cf37853702ded4a9b4f1
  9. Configure newrelic settings in newrelic.ini file.
    1. Goto path "/etc/php5/conf.d/"
    2. Edit the file "newrelic.ini" with license key as given and appname related to the server 
  10. sudo service newrelic-sysmond start
  11. sudo service apache2 restart
  12. Check newrelic configurations with PHP Info
  13. Type the command in shell script
    1. php –info | less

No comments:

Post a Comment

Thank you so much for providing your valuable feedback. I will will look into them and update my skills & technologies accordingly.