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

  1. 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 ```
  2. 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.
  3. 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.
  4. 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.
  5. 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

  1. From the top right of the screen, perform one of the following actions:
    • Click Settings > Data Collection, select the TrueSight meter, and select the Sources tab.
    • Click Settings > Configure Sources.
  2. 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.
  3. Click the name of the source to view source details.
  4. Select the Plugins tab.
  5. Use the search box or scroll through the page to find the plugin you want to install.
  6. 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.

Advanced configuration

To customize this plugin, see NGINX plugin on GitHub.

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

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*