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):
- sudo wget -O – http://download.newrelic.com/548C16BF.gpg | sudo apt-key add –
- sudo nano /etc/apt/sources.list.d/newrelic.list
- paste in text: “deb http://apt.newrelic.com/debian/ newrelic non-free”, then save file
- sudo apt-get update; sudo apt-get install newrelic-php5
- sudo newrelic-install install*
- paste in your key
- 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:
- sudo wget -O /etc/apt/sources.list.d/newrelic.list http://download.newrelic.com/debian/newrelic.list
- sudo apt-key adv –keyserver hkp://subkeys.pgp.net –recv-keys 548C16BF
- sudo apt-get update
- sudo apt-get install newrelic-sysmond
- sudo nrsysmond-config –set license_key=[your license key]
- 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.