Return to site

Using new Relic's Free Server Monitoring

  Why a New Relic? Due to some random circumstances at work (and off the side) I haven't used New Relic for a while (3 years). I recently checked out their Server monitoring tier and found that it was not part of their other offerings, including APM, Insights Mobile, Browser, and others. It's not the way I remember it, but perhaps the distinction was in the marketing/communications. The best part about the Server monitoring tier? It's free! In terms of your web application, you'll get most value out of New Relic with their paid services, I've found their free Server monitoring to still be a lifesaver, especially when monitoring many (70+) servers. The free monitoring of servers is an introduction to make it easier for you to make a decision to purchase into paid products, of course. It remains to be seen whether it will remain free. We run trials for customers and pay-per-hosting through AWS. Because the main application is an on-premise one (and not the typical multi-tenant structure of code and database), we have a server for each instance. This allows us to have multiple servers running! Cloudwatch is set up with SNS for notifications and alarms however it's still difficult to use Cloudwatch to see all the servers. We decided to test New Relic on a subset of the servers to see what insight we could find. We were delighted to have done so. Install The server monitoring daemon installation is easy, particularly because they give you instructions specific to your OS on a silver-plated plate when you add a new server to their web console. For Debian/Ubuntu servers, the instructions are as follows (only slightly altered for servers that are not running as user root): The instructions will provide you with your license key. Don't blindly copy and paste the license number above?. Configure Technically speaking, you don't need to change anything else. However, I prefer to change one thing. The server name as shown in New Relic will match the host name of the server that you can locate using the command hostname. This may not be the way you want to identify it Therefore, you can wait for the server to appear in New Relic, or configure the hostname ahead of time in the New Relic configuration installed on your server. I went with the latter option. Edit the /etc/newrelic/nrsysmond.cfg file and change the hostname section to whatever is appropriate for your server. After making any changes, restart (or restart) the newrelic-sysmond services: Soon, you'll see the server appear in your New Relic account under the Server section, without any additional effort on your part. What We Watch Although the New Relic monitoring isn't very sophisticated, it does come with some really nice features. Processes and their number. PHP is running a little out of control. That's one thing we were alerted about. The server's CPU usage has surpassed the default threshold of 15 mins. We found some zombie PHP processes, which we killed off quickly. We saw immediately a reduction in CPU back to normal levels. You can also get a more detailed view by sorting by the amount of memory or cpu used. Disk Usage New Relic also issued alerts about disk usage. One server had a lot of files taking up a lot of space. Gservers We were able reduce the disk space consumed by manually deleting extra media files, giving us time to provision more space on the hard drive.

Gservers