Just Set Up New Relic For Server And Application Monitoring

I recently was introduced to New Relic, the Server and Application Monitoring service for web developers. They were the title sponsor of an awesome WordPress conference I attended in November, Pressnomics. I have been looking to have a nice server and web application monitoring service on my cloud server and New Relic looked awesome. They offer a 14-day free trial of their top Pro service, but for the month of December you can extend that to 30 days using promo codeĀ VELOCITY30 (thanks RetailMeNot).

I was happily surprised to see that setup was easily handled via the package management system, “apt-get” in my case, and a very handy script that becomes available after installing the package from their repositories. I’m not a fan of building packages from scratch (what decade is this?) and like when applications and services make it easy on me.

The entire web application monitoring setup required basically these few steps in the terminal (*with one tweak, see below):

  1. sudo wget -O – http://download.newrelic.com/548C16BF.gpg | sudo apt-key add –
  2. sudo nano /etc/apt/sources.list.d/newrelic.list
  3. paste in text: “deb http://apt.newrelic.com/debian/ newrelic non-free”, then save file
  4. sudo apt-get update; sudo apt-get install newrelic-php5
  5. sudo newrelic-install install*
  6. paste in your key
  7. sudo /etc/init.d/apache2 restart (to restart Apache)

*The one snag I hit was during step 5 above. The install script couldn’t find my PHP install. The error message was really useful and suggested making sure your PHP install could be found in your PATH or installing the php-config package. I started messing with my PATH to no avail and instead figured it’d be easier to just install the php-config package. So I ran:

sudo apt-get install php-config

After that finished, I was able to run the install script in step 5 and continue on without issue.

Within a few seconds after restarting Apache I could log into my New Relic account and see the monitoring service logging and monitoring my web application. There was a big notice that I could install server monitoring free, as well, and I thought that was a no-brainer. That was easy to set up, too:

  1. sudo wget -O /etc/apt/sources.list.d/newrelic.list http://download.newrelic.com/debian/newrelic.list
  2. sudo apt-key adv –keyserver hkp://subkeys.pgp.net –recv-keys 548C16BF
  3. sudo apt-get update
  4. sudo apt-get install newrelic-sysmond
  5. sudo nrsysmond-config –set license_key=[your license key]
  6. sudo /etc/init.d/newrelic-sysmond start

That’s it. I now have New Relic monitoring my server and web application. Their dashboard is very nice with useful graphs and important stats on how everything is running. Almost every stat or graph is a link that lets you drill down further for more stats and info. I’m also excited to be automatically notified if there are problems with my server and have nice information for troubleshooting in such an event.

I have high hopes for this service and would like to provide a followup post once I’ve used the service for awhile. Stay tuned.

,

One Response to “Just Set Up New Relic For Server And Application Monitoring”

  1. Anders April 2, 2015 at 5:08 am #

    Hi, I’m new to Debian and glad to find this post, Ive got newrelic up and running, Thank You.

Leave a Reply