Monitoring Tools

New Relic

Configure newrelic with Gunicorn:

$ pip install newrelic
$ newrelic-admin generate-config <LICENSE_KEY> newrelic.ini
$ NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program
    gunicorn -b -w ${GUNICORN_WORKERS:-3} pomegranate.wsgi:application

Install New Relic server on Debian/ubuntu

$ echo deb newrelic non-free >> /etc/apt/sources.list.d/newrelic.list
$ wget -O- | apt-key add -
$ apt-get update
$ apt-get install newrelic-sysmond
$ nrsysmond-config --set license_key=<LICENSE_KEY>
$ /etc/init.d/newrelic-sysmond start
# To uninstall
$ apt-get remove newrelic-sysmond

Enabling New Relic Servers for Docker

$ groupadd -r docker
$ usermod -a -G docker newrelic

What is

This is for RUM injections for our Browser monitoring product.

How to install Nginx New Relic plugin

$ wget
$ sudo apt-key add nginx_signing.key
$ sudo vim /etc/apt/sources.list
    # Debian
    deb jessie nginx
    deb-src jessie nginx
    # Ubuntu
    deb trusty nginx
    deb-src trusty nginx

$ sudo apt-get update
$ sudo apt-get install nginx-nr-agent


Thanks for using NGINX!

NGINX agent for New Relic is installed. Configuration file is:

Documentation and configuration examples are available here:

Please use "service nginx-nr-agent" to control the agent daemon.

More information about NGINX products is available on:
$ sudo vim /etc/nginx-nr-agent/nginx-nr-agent.ini
# update LICENCE KEY and [source] section
$ sudo vim nginx.conf

    # Server status
    location = /status {
        stub_status on;
        deny all;

Testing the New Relic Nginx plugin

The best way to check if this is working is to tail the logs:

$ tail -f /var/log/nginx-nr-agent.log

Real-time web log analyzer and interactive viewer

$ goaccess -f nginx.log

$ goaccess -f nginx.log --log-format="%h %^[%d:%^] \"%r\" %s %b \"%R\" \"%u\"" --date-format="%d/%b/%Y" --time-format="%T" -a > report.html