Documentation forAppOptics

NGINX PLUS

Overview

NGINX Plus is a paid version of open source NGINX web server with a strong focus on high concurrency, performance and low memory usage. It's one of the most popular web servers on the internet, and can also act as a reverse proxy, a load balancer, or as an HTTP cache.

The SolarWinds Snap Agent allows you to easily monitor the health of your NGINX Plus service(s) over ngx_http_status_module.

This integration is currently available for Windows and Linux platforms.

This integration is replaced by NGINX Plus API.

Setup

The nginx monitoring is accomplished by bridge plugin which is included with the SolarWinds Snap Agent by default. Please follow the directions below to enable it for a agent instance. The bridge plugin utilize Telegraf NGINX Plus plugin.

Prerequisites

Your NGINX Plus server will need a location defined with the ngx_http_status_module activated. Please refer to module documentation for more details on enabling it.

Configuration

The agent provides an example task file to help you get started quickly, but requires you to provide the correct settings for your NGINX Plus installation. To enable the task:

  1. Make a copy of the NGINX Plus example task file task-bridge-nginx_plus.yaml.example, renaming it to task-bridge-nginx_plus.yaml:

    On Windows, using Explorer or PowerShell:

    Copy
    > copy "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-bridge-nginx_plus.yaml.example" "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-bridge-nginx_plus.yaml"

    On Linux using command line:

    Copy
    $ sudo cp /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-nginx_plus.yaml.example /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-nginx_plus.yaml
  2. Edit the task file with settings specific to your NGINX Plus install:

    If you wish to also collect logs for this service, uncomment the last section in the example task file. For more information on collecting logs, see the logs collector docs.

    Copy
    ---
    version: 2

    schedule:
      type: cron
      interval: "0 * * * * *"
      
    plugins:
      - plugin_name: bridge
      
        config:
          nginx_plus:
            ## An array of ngx_http_status_module or status URI to gather stats.
            urls:
              - http://localhost/status
            
            ## Optional TLS Config
            # tls_ca: /path/to/cafile
            # tls_cert: /path/to/certfile
            # tls_key: /path/to/keyfile
            
            ## Use TLS but skip chain & host verification
            # insecure_skip_verify: false
            ## HTTP response timeout (default: 5s)
            response_timeout: "5s"
            
        publish:
          - plugin_name: publisher-appoptics
          
    ## If you want to gather logs for this integration, uncomment the following section.
    #  - plugin_name: logs
    #    config:
    #      sources:
    #        log_files:
    #          file_paths:
    #            - path: /var/log/nginx/access.log
    #            - path: /var/log/nginx/error.log
    #    publish:
    #     - plugin_name: publisher-appoptics
  3. Restart the agent:

    On Windows command line:

    Copy
    > net stop swisnapd
    > net start swisnapd

    On Linux command line:

    Copy
    $ sudo service swisnapd restart
  4. Enable the NGINX Plus integration in AppOptics

    On the Integrations Page you will see NGINX Plus integration available if the previous steps were successful. It may take a couple minutes before the NGINX Plus integration is identified. Select the NGINX Plus integration to open the configuration menu in the UI, and enable it. If you do not see it, see Troubleshooting Linux.

Testing Integration

To check if and what metrics can be collected with given configuration, run bridge plugin in debug mode:

On Windows command line:

Copy
> "C:\Program Files\SolarWinds\Snap\bin\snap-plugin-collector-bridge.exe" --debug-mode --plugin-config "{\"nginx_plus\": {\"urls\": [\"http://localhost/status\"]}}"

On Linux command line:

Copy
$ /opt/SolarWinds/Snap/bin/snap-plugin-collector-bridge --debug-mode --plugin-config "{\"nginx_plus\": {\"urls\": [\"http://localhost/status\"]}}"

Metrics and Tags

Metrics

The table below lists each of the metrics collected by the NGINX Plus integration. By default, all metrics are collected if they are available. To filter desired ones, please refer to Metric Format for more details.

Name
nginx_plus.processes.respawned
nginx_plus.connections.accepted
nginx_plus.connections.dropped
nginx_plus.connections.active
nginx_plus.connections.idle
nginx_plus.ssl.handshakes
nginx_plus.ssl.handshakes_failed
nginx_plus.ssl.session_reuses
nginx_plus.requests.total
nginx_plus.requests.current
nginx_plus.upstream.keepalive
nginx_plus.upstream.zombies
nginx_plus.stream_upstream.keepalive
nginx_plus.stream_upstream.zombies
nginx_plus.upstream_peer.requests
nginx_plus.upstream_peer.unavail
nginx_plus.upstream_peer.healthchecks_checks
nginx_plus.upstream_peer.header_time
nginx_plus.upstream_peer.response_time
nginx_plus.upstream_peer.state
nginx_plus.upstream_peer.active
nginx_plus.upstream_peer.downstart
nginx_plus.upstream_peer.healthchecks_last_passed
nginx_plus.upstream_peer.weight
nginx_plus.upstream_peer.responses_1xx
nginx_plus.upstream_peer.responses_2xx
nginx_plus.upstream_peer.responses_3xx
nginx_plus.upstream_peer.responses_4xx
nginx_plus.upstream_peer.responses_5xx
nginx_plus.upstream_peer.received
nginx_plus.upstream_peer.selected
nginx_plus.upstream_peer.healthchecks_fails
nginx_plus.upstream_peer.healthchecks_unhealthy
nginx_plus.upstream_peer.backup
nginx_plus.upstream_peer.responses_total
nginx_plus.upstream_peer.sent
nginx_plus.upstream_peer.fails
nginx_plus.upstream_peer.downtime
nginx_plus.stream_upstream_peer.requests
nginx_plus.stream_upstream_peer.unavail
nginx_plus.stream_upstream_peer.healthchecks_checks
nginx_plus.stream_upstream_peer.header_time
nginx_plus.stream_upstream_peer.response_time
nginx_plus.stream_upstream_peer.state
nginx_plus.stream_upstream_peer.active
nginx_plus.stream_upstream_peer.downstart
nginx_plus.stream_upstream_peer.healthchecks_last_passed
nginx_plus.stream_upstream_peer.weight
nginx_plus.stream_upstream_peer.responses_1xx
nginx_plus.stream_upstream_peer.responses_2xx
nginx_plus.stream_upstream_peer.responses_3xx
nginx_plus.stream_upstream_peer.responses_4xx
nginx_plus.stream_upstream_peer.responses_5xx
nginx_plus.stream_upstream_peer.received
nginx_plus.stream_upstream_peer.selected
nginx_plus.stream_upstream_peer.healthchecks_fails
nginx_plus.stream_upstream_peer.healthchecks_unhealthy
nginx_plus.stream_upstream_peer.backup
nginx_plus.stream_upstream_peer.responses_total
nginx_plus.stream_upstream_peer.sent
nginx_plus.stream_upstream_peer.fails
nginx_plus.stream_upstream_peer.downtime

Tags

The table below lists tags available for the NGINX Plus metrics.

Tag Name Metric Groups
hostname (@host) all metrics
server all metrics
port all metrics
id upstream_peer, stream_upstream_peer
upstream upstream, stream_upstream, upstream_peer, stream_upstream_peer
upstream_address upstream_peer, stream_upstream_peer

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.