Skip to content

Nginx Integration

image

Infrastructure Integration

Overview

With NGINX integration to Epoch you can - Monitor incoming requests & their overall statuses - Active & idle connections

& More.

Instructions

Follow the installation guide below for your given collector environment.

During installation, use the configuration section below as reference.

After installation, the infrastructure datasources in the table below will be available in the AOC.

Installation Guide

Installing this integration consists of creating a yaml file in the filesystem of your collectors. Click below for instructions on how to do so for your given collectors environment.

Docker

Kubernetes

Mesos-Marathon

Debian

Ubuntu

RHEL/CentOS

SUSE

Configuration

Ensure that your nginx config file (for ex., /etc/nginx/conf.d/default.conf), contains the stub_status endpoint enabled as below.

location /nginx_status {
  stub_status;
}

If it is not enabled, please add the block above and reload nginx conf using nginx -s reload.

Edit nginx.yaml to configure the agent. The location of this file depends on your Epoch installation environment. Refer the installation guide to find the location of this file for you. The configuration in below example lets Epoch connect to your NGINX runtime. All of the available configuration options can be found here: nginx.yaml.

    init_config:

    instances:
      - nginx_status_url: http://localhost/nginx_status/

Restart the agent after saving the file.

Validating Configuration

Run the command under Checking Runtime section of the installation guide applicable to your environment. Look for tomcat under the checks section in the command output. The output should look like this:

Checks
======

  nginx (1.1.0)
  -------------
    - instance #0 [OK]
    - Collected 7 metrics, 0 events & 1 service check

Infrastructure Datasources

With the configuration set, you can use below datasources in Epoch AOC while creating charts and widgets.

Datasource Available Aggregations Unit Description
nginx.net.writing avg max min sum connection The number of connections waiting on upstream responses and/or writing responses back to the client.
nginx.net.waiting avg max min sum connection The number of keep-alive connections waiting for work.
nginx.net.reading avg max min sum connection The number of connections reading client requets.
nginx.net.connections avg max min sum connection The total number of active connections.
nginx.net.request_per_s avg max min sum request/second Rate of requests processed.
nginx.net.conn_opened_per_s avg max min sum connection/second Rate of connections opened.
nginx.net.conn_dropped_per_s avg max min sum connection/second Rate of connections dropped.
nginx.connections.accepted avg max min sum connection The total number of accepted client connections.
nginx.connections.active avg max min sum connection The current number of active client connections.
nginx.connections.dropped avg max min sum connection The total number of dropped client connections.
nginx.connections.idle avg max min sum connection The current number of idle client connections.
nginx.generation avg max min sum The total number of configuration reloads.
nginx.load_timestamp avg max min sum millisecond Time of the last reload of configuration (time since Epoch).
nginx.pid avg max min sum The ID of the worker process that handled status request.
nginx.processes.respawned avg max min sum process The total number of abnormally terminated and respawned child processes.
nginx.requests.current avg max min sum request The current number of client requests.
nginx.requests.total avg max min sum request The total number of client requests.
nginx.server_zone.discarded avg max min sum request The total number of requests completed without sending a response.
nginx.server_zone.processing avg max min sum request The number of client requests that are currently being processed.
nginx.server_zone.received avg max min sum byte The total amount of data received from clients.
nginx.server_zone.requests avg max min sum request The total number of client requests received from clients.
nginx.server_zone.responses.1xx avg max min sum response The number of responses with 1xx status code.
nginx.server_zone.responses.2xx avg max min sum response The number of responses with 2xx status code.
nginx.server_zone.responses.3xx avg max min sum response The number of responses with 3xx status code.
nginx.server_zone.responses.4xx avg max min sum response The number of responses with 4xx status code.
nginx.server_zone.responses.5xx avg max min sum response The number of responses with 5xx status code.
nginx.server_zone.responses.total avg max min sum response The total number of responses sent to clients.
nginx.server_zone.sent avg max min sum byte The total amount of data sent to clients.
nginx.ssl.handshakes avg max min sum The total number of successful SSL handshakes.
nginx.ssl.handshakes_failed avg max min sum The total number of failed SSL handshakes.
nginx.ssl.session_reuses avg max min sum The total number of session reuses during SSL handshake.
nginx.timestamp avg max min sum millisecond Current time since Epoch.
nginx.upstream.keepalive avg max min sum connection The current number of idle keepalive connections.
nginx.upstream.peers.active avg max min sum connection The current number of active connections.
nginx.upstream.peers.backup avg max min sum A boolean value indicating whether the server is a backup server.
nginx.upstream.peers.downstart avg max min sum millisecond The time (since Epoch) when the server became “unavail” or “unhealthy”.
nginx.upstream.peers.downtime avg max min sum millisecond Total time the server was in the “unavail” and “unhealthy” states.
nginx.upstream.peers.fails avg max min sum The total number of unsuccessful attempts to communicate with the server.
nginx.upstream.peers.health_checks.checks avg max min sum The total number of health check requests made.
nginx.upstream.peers.health_checks.fails avg max min sum The number of failed health checks.
nginx.upstream.peers.health_checks.last_passed avg max min sum Boolean indicating if the last health check request was successful and passed tests.
nginx.upstream.peers.health_checks.unhealthy avg max min sum How many times the server became unhealthy (state “unhealthy”).
nginx.upstream.peers.id avg max min sum The ID of the server.
nginx.upstream.peers.received avg max min sum byte The total amount of data received from this server.
nginx.upstream.peers.requests avg max min sum request The total number of client requests forwarded to this server.
nginx.upstream.peers.responses.1xx avg max min sum response The number of responses with 1xx status code.
nginx.upstream.peers.responses.2xx avg max min sum response The number of responses with 2xx status code.
nginx.upstream.peers.responses.3xx avg max min sum response The number of responses with 3xx status code.
nginx.upstream.peers.responses.4xx avg max min sum response The number of responses with 4xx status code.
nginx.upstream.peers.responses.5xx avg max min sum response The number of responses with 5xx status code.
nginx.upstream.peers.responses.total avg max min sum response The total number of responses obtained from this server.
nginx.upstream.peers.selected avg max min sum millisecond The time (since Epoch) when the server was last selected to process a request (1.7.5).
nginx.upstream.peers.sent avg max min sum byte The total amount of data sent to this server.
nginx.upstream.peers.unavail avg max min sum How many times the server became unavailable for client requests (state “unavail”) due to the number of unsuccessful attempts reaching the max_fails threshold.
nginx.upstream.peers.weight avg max min sum Weight of the server.
nginx.version avg max min sum Version of nginx.