I’ve been using the RTCamp Ubuntu package for Nginx because it had ngx_cache_purge and ngx_pagespeed modules builtin. The problem with is that it’s still stuck on Nginx 1.8 version which doesn’t support HTTP/2 so I had to figure out how to do my own build based on the latest Nginx mainline version. More
With New Relic Server Monitoring you’ll see all the important information about your system with just one glance. This is a essential tool for troubleshooting performance issues and also seeing that your system is properly sized. Sometimes poor application performance has nothing to do with the application but rather the system it’s running. If the system is not correctly sized you might be running out of memory, cpu or the bottle neck could be disk io. Without proper monitoring it is very hard to pinpoint the cause.
The servers listing gives a nice overview of all servers and you an easily see if there’s any issues.
When looking at a specific server you’ll see a history of it’s CPU and memory usage as well as load average and network I/O. If you have any APM enabled applications installed you’ll see a overview of their response times, throughput and error rate. You’ll also see some of the top processes running on the server.
When you drill down to processes listing you’ll quickly see the top memory and cpu consumers. You can also look at the history of individual processes.
Installing New Relic Server Monitoring on a Ubuntu / Debian Server
1) Add an apt source for New Relic.
cat - <<-EOF >> /etc/apt/sources.list.d/newrelic.list # newrelic repository list deb http://apt.newrelic.com/debian/ newrelic non-free EOF
2) You’ll need to get the key for New Relic repository and then update apt sources. After that you can install newrelic-sysmond.
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xB31B29E5548C16BF apt-get update apt-get install newrelic-sysmond
3) Next you’ll need to tell it your license key so that it reports the data to your account. You can find your license key from your account settings page on rpm.newrelic.com. You can either edit the configuration file or you can set the license like shown below:
/usr/sbin/nrsysmond-config --set license_key=YOUR_LICENSE_KEY
4) Finally once everything is configured you can start the system monitor daemon.
service newrelic-sysmond start
Now in few minutes you should start seeing your server listed under Servers on rpm.newrelic.com
I like to to automate all the tasks I do often and of the things many of my virtual servers need is Java JDK. Unfortunately the Oracle JDK is not available as debian package but there’s a way to make it. This is where WebUpd8 Team PPA comes in as they provide installer for java6, java7 and java8.
Below is the script I use to install it unattended. You can download it also from github gist. If you want Java6 then just use oracle-java6-installer and for Java 8 oracle-java8-installer. This also works other ubuntu versions just substitute trusty with the code of your ubuntu release like precise for Ubuntu 12.04. Hope you find this useful.
cat - <<-EOF >> /etc/apt/sources.list.d/webupd8team-java.list # webupd8team repository list deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main # deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main EOF apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xEEA14886 echo debconf shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections echo debconf shared/accepted-oracle-license-v1-1 seen true | /usr/bin/debconf-set-selections apt-get update apt-get install oracle-java7-installer