NGINX+

Type of Data

Load Balancer Metrics

Description

  • The Fusion adapter integrates with the NGINX+ status API feed.
  • Sample: http://demo.nginx.com/status
  • Format: JSON
  • Data Metrics related to the NGINX instance to ingest: Basic metrics from the NGINX+ status feed.

Data Feed

Feed values

Metric Feed Value JSON Object
IP address of LB address  
Timestamp load_timestamp  
Load Timestamp timestamp  
Process Info processes (entire JSON block) { respawned: counter }
Connection Info connections (entire JSON block) { accepted: counter, dropped: counter, active: current counter, idle: counter }
SSL Info ssl { handshakes: counter, handshakes_failed: counter, session_reuses: counter }
Requests Info requests { total: counter, current: current counter }
Upstreams upstreams (entire JSON block) {["upstream name"]: peers: { [peer index]: id: integer, server: IP string, name: IP string, back up: boolean, weight: integer, state: "up, down, unavail, checking, or unhealthy," active: current counter, requests: counter, header_time: average time (ms), response_time: average time (ms), responses: { 1xx: counter, 2xx: counter, 3xx: counter, 4xx: counter, 5xx: counter, total: counter }, sent: counter, received: counter, fails: counter, unavail: counter, health_checks: { checks: counter, fails: counter, unhealthy: counter, last_passed: boolean }, downtime: time (ms), downstart: timestamp, selected: timestamp }, keepalive: counter, zombies: counter, zone: "zone name" }

Configured Info per Load Balancer

Endpoint from where to pull status: http://nginx.org/en/docs/http/ngx_http_api_module.html

Implementation Notes

Fusion feed queries these endpoints on the NGINX+ server:

  • /processes
  • /connections
  • /ssl
  • /requests
  • /upstreams

Server Configuration

Example Configuration

The official NGINX Plus docs have details on how to configure the expanded status module.

http://nginx.org/en/docs/http/ngx_http_status_module.html#data

Metrics collection: NGINX Plus

The commercial NGINX Plus provides many more metrics through its ngx_http_status_module than are available in open-source NGINX. Among the additional metrics exposed by NGINX Plus are bytes streamed, and information about upstream systems and caches. NGINX Plus also reports counts of all HTTP status code types (1xx, 2xx, 3xx, 4xx, 5xx). A sample NGINX Plus status board is available here.

Note: the “Active” connections on the NGINX Plus status dashboard are defined slightly differently than the Active state connections in the metrics collected via the open-source NGINX stub status module. In NGINX Plus metrics, Active connections do not include connections in the Waiting state (aka Idle connections). NGINX Plus also reports metrics in JSON format for easy integration with other monitoring systems. With NGINX Plus, you can see the metrics and health status for a given upstream grouping of servers, or drill down to get a count of just the response codes from a single server in that upstream:

{"1xx":0,"2xx":3483032,"3xx":0,"4xx":23,"5xx":0,"total":3483055}

To enable the NGINX Plus metrics dashboard, you can add a status server block inside the HTTP block of your NGINX configuration. See this section on collecting metrics from open-source NGINX for instructions on locating the relevant config files. For example, to set up a status dashboard at http://your.ip.address:8080/status.html and a JSON interface at http://your.ip.address:8080/status, you would add the following server block:

server {
        listen 8080;
        root /usr/share/nginx/html;
        location /status {
          status;
        }
        location = /status.html {
        }
      }

<!--NeedCopy-->

The status pages must be live once you reload your NGINX configuration:

nginx -s reload

Source: https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/

Set up in Fusion

You can access Fusion Data Feeds from the left navigation pane, under Openmix. For initial steps refer to the Fusion Integration Documentation.

When you get to the service-specific configuration dialog box, enter the following:

  • Name: The name given to the data feed. This defaults to “Service - Platform Name” if not specified.
  • Run Every: The frequency with which the data feed is updated from the service.
  • Platform: The Platform that is associated with the data feed.
  • URL: The URL is an endpoint on the customer’s network that returns the data that the customer wants to see in Openmix.

Once the installation is complete, it is listed on the Fusion data feeds home page with a green status and monitoring metrics in the log history.

To edit a Fusion data feed click the data feed in the list and then click the Edit button. Once you have changed the configuration, click Save. This brings you back to the data feed list with your changes saved and applied to the data feed.

NGINX+