With the number of servers and applications in maintenance of my company growing it became time to find a decent solution that keeps tabs on the health of our servers. Though there are open source solutions available such as graphite that will gather and graph data collected with open source statistics gatherers like collectd it is hard to beat the ease of use and functionality of Newrelic.
Newrelic is a cloud platform that offers realtime server statistics graphing, application inspection, an elaborate alert triggering system and an easy to install daemon that will get you started with monitoring your servers in no-time.
We are using the following ansible script to install newrelic on any machine we deploy to, independent of it being a staging, acceptance or production environment:
with the license key being supplied from the (ansible-vault encrypted) group_vars folder environment specific file.
Once the daemon is running and sending its data to newrelic you can inspect your webservers through their web application. Statistics like CPU load, memory usage and diskspace can be monitored with ease and configuring the thresholds for when to trigger an email alert / slack notification is a breeze.
New relic offers several libraries that can be included into your application code as well which allows even deeper inspection. We are using the node library integration that shows responsetimes for different endpoints, API throughput and an Appdex score based on your services availability.
The basic subscription is free to use and is a great way to get started getting more grip on the uptime of your infrastructure!