NGINX plugin
This plugin
collects performance stats from an NGINX instance.
Prerequisites
Meter version 4.2 or later must be installed.
The NGINX plugin supports the following Operating Systems.
Linux | ✅️ |
Windows | ✅️ |
Smart OS | ✅️ |
OS X | ✅️ |
Plugin Setup
To collect statistics from nginx, it needs to be built with the nginx HttpStubStatusModule.
- If you used a package manager to install Nginx, it should be compiled by default.
- If you built Nginx yourself, you may need to recompile it.
Verify That nginx Includes HttpStubStatusModule
- To check if your nginx has been build with the nginx HttpStubStatusModule run the following command, which will display the modules that are compiled in your version of nginx:
$ nginx -V ``` - If the string --with-http_stub_status_module is in the output then the installed nginx includes the HttpStubStatusModule. If the string is not there, you will need to install a package that includes the module or compile a version that includes it. Information on installing and/or compiling nginx can found here: http://nginx.org/en/docs/install.html HttpStubStatusModule Configuration
nginx requires configuration to provide URL path which will present the nginx statistics. - Add the nginx configuration file boundary.conf to your nginx configuration directory which is typically /etc/nginx on Linux/Unix platforms, or ...\nginx\conf on Windows platforms. The contents of this file configures a location required for the plugin to obtain measurements from nginx.
- Include the boundary.conf in your nginx configuration file by adding the directive:
... ## # Meter Plugin Configuration ## include /etc/nginx/boundary.conf; }
in the http block. - After you make the configuration, reload your nginx configuration:
$ sudo service nginx reload
Alternatively, on Linux/Unix platforms you can place the boundary.conf file in /etc/nginx/conf.d
Verify HttpStubStatusModule is Collecting Statistics
Run the following command, which shows the expected output.
$ curl http://localhost:8000/nginx_status
Active connections: 1
server accepts handled requests
5 5 5
Reading: 0 Writing: 1 Waiting: 0
To install the plugin
- From the top right of the screen, perform one of the following actions:
- Click
> Data Collection, select the TrueSight meter, and select the Sources tab.
- Click
> Configure Sources.
- Click
- Use the search box or scroll through the page to find the source system which has the TrueSight meter on which you want to install the plugin.
- Click the name of the source to view source details.
- Select the Plugins tab.
- Use the search box or scroll through the page to find the plugin you want to install.
Click + Install to start the installation.
Refer to the following sections for the configuration details required to collect data and view the list of plugin metrics.
Configuration details
Field Name | Description |
---|---|
Source | The Source to display in the legend for the nginx data. It will default to the hostname of the server |
Statistics URL | The URL endpoint of where the nginx statistics are hosted. |
Strict SSL | Use Strict SSL checking when HTTPS is enabled, enabled by default |
Username | If the endpoint is password protected, what username should graphdat use when calling it. |
Password | If the endpoint is password protected, what password should graphdat use when calling it. |
Plugin metrics
Metric Name | Description |
---|---|
Nginx Active Connections | Active connections to nginx |
Nginx Reads | Connections with Nginx reading request headers |
Nginx Writes | Connections with Nginx reading request body, processing request or writing response to client. |
Nginx Waiting | Keep-alive connections with Nginx in a wait state |
Nginx Connections Handled | Connections handled by nginx |
Nginx Connections Not Handled | Connections accepted, but not handled |
Nginx Requests | Requests to nginx |
Nginx Requests per Connection | Requests per handled connections for nginx |