This project provides an NPI-compatible plugin for New Relic capable of reporting Nginx statistics to the New Relic platform.
This project exists simply because the official plugin from Nginx, Inc. does not support NPI and requires yet another runtime (Python) to be installed and maintained on my production servers. I also thought this would be a good chance to do something useful while learning more about Java.
- A New Relic account. Sign up for a free account here
- Java Runtime (JRE) environment Version 1.6 or later
- A running instance of Nginx with the HTTP stub status module enabled
- Network access to New Relic (authenticated proxies are not currently supported)
This plugin supports installation via the New Relic Platform Installer (NPI). More information about the NPI tool and how to install it can be found in the New Relic docs.
The plugin can then be installed using the npi tool:
./npi install com.ryanchouinard.newrelic.nginx
You will need an instance of Nginx running with a status URL accessible by the host running the plugin. Consult the Nginx manual for details about the http_stub_status_module.
During installation, you will be prompted to configure the plugin. Choosing
to do so will open the configuration file in an editor. The configuration file
is a simple JSON document. The keys should be self-explanatory, but name
can
be any string you wish to identify the host in the New Relic dashboards, and
status_url
is the full URL to the Nginx stub status page.
Overview
- Connections
- Request rate
Connections
- Active
- Idle
- Accept rate
- Drop rate
Requests
- Active
- Rate
The MIT License (MIT). Please see License File for more information.