Using New Relic's Free Server Monitoring

Using New Relic's Free Server Monitoring


Why a New Relic?



New Relic was discontinued for me in 2003, purely due to random circumstances at my workplace (and on the side). Recently, I looked at their Server monitoring tier and discovered that it was separate from their other offerings, such as APM, Insights Mobile, Browser, and others.



It is not what I remember, but maybe it was in the marketing/messaging. The best part about the Server monitoring tier? It's free!



While in terms of your web application, you'll get the most value out of New Relic with their paid offerings, I've found the free Server monitoring to still be an instant life saver, especially when monitoring many (70+) servers.



The free server monitoring tier is a lead-in to make it easier on your to decide to buy into the paid products, of course. It remains to be seen if this will remain free.



We use AWS to host paid hosting and customer trials at work. Since the main application is an on-premise application (and not the typical multi-tenant code/database structure), we have a server per application instance. This allows us to have many servers running!



Cloudwatch is set up with SNS to send notifications and alarms. However, it's still difficult for Cloudwatch users to see all the servers. We decided to test New Relic with a subset on the servers to see if we could gain any insights.



We were delighted to do so.



Install



Installing the server monitoring daemon is really easy, particularly because they hand you OS-specific instructions on a silver platter when you choose to add a new server within their web console.



These instructions apply to Debian/Ubuntu server (only slightly modified if you are not running as root):



The instructions will give you your license code. Do not blindly copy and paste above the license key.



Configure



Technically, you don't need to do any additional configuration. However, I like to change one thing. The server name as shown in New Relic will match the server's host name, which you can find by running the command hostname.



This might not be how you want to identify it. So you have two options: wait for the server in New Relic or configure the hostname beforehand in the New Relic configuration that is installed on your server. I chose the second option.



Edit the /etc/newrelic/nrsysmond.cfg file and change the hostname section to whatever is appropriate for your server.



After making any changes, start (or restart) the newrelic-sysmond service:



Without further effort, you'll soon notice the server in your New Relic account under Server section.



What We Watch



Although this monitoring on New Relic may not be very advanced, it does offer some really nice features.



Processes and their count.



PHP is running a little out of control. That was one thing we were alerted about. The server's CPU usage has exceeded their default threshold of 15 mins.



We quickly killed off some PHP processes that were running in zombie mode. We saw an immediate reduction in CPU usage.



We can also view each process type more in detail by sorting by memory and CPU usage.



Disk Usage



New Relic also gave us alerts about disk usage. One server had a lot of files that were taking up too much space. We were able decrease the disk space by manually deleting excess media files. This allowed us to allocate more hard drive space.

Gaming