Install and Configure Nginx Web Server Plugin

The Nginx Web Server plugin captures any Nginx supported web application requests or the raw HTTP and HTTPs data of all the Nginx web application requests. The plugin captures the raw data for both static and dynamic pages. The plugin also captures additional meta-data details such as request/response times and sizes, client/server IP/Port and protocol mode (HTTP/HTTPS). Once the data is captured, the plugin adds the correlation details (such as unique componentID) in the raw http data to track which response belongs to which request.
The plugin however does not capture the raw HTTP or HTTPs data for binary response payloads such as images. The payloads capture is controlled through the request and response content-type configuration settings.
By default, the Plugin filters the resources image URLs based on the content type to reduce the overhead on the Plugin. You can configure the
FilterimageurlFlag
property to change this default behavior. However, the Plugin does not filter the image URLs that include any errors such as 404 error. 
Prerequisite:
Supported version of Nginx is installed.
Follow these steps:
  1. Log in to
    DX APM
    .
  2. Open
    DX Application Performance Management
    .
  3. In the left navigation pane, click
    Settings.
  4. Under
    Integrations
    ,
    click
    Business Payload Analyzer
    .
  5. In the
    Business Payload Analyzer Rule Management
    page, click the
    Download
    icon and then click
    Download Nginx Plugin
    .
  6. Extract the downloaded file.
  7. Copy the downloaded file to the
    /etc/nginx/modules
    directory.
  8. Open a new text file and save the file as
    nginx.conf
    .
  9. Add the following line to the
    nginx.conf
    file to load the modules:
    load_module /etc/nginx/modules/ngx_http_ca_plugin_filter_module.so;
  10. After you load the modules, the next step is to configure the properties. You can use the default properties or you can configure these properties to suit your requirement:
    Property
    Description
    Max Size of the Dump Request Payload
    Use this property to limit the request payload or body capture size to capture complete payload or body part.
    DumpRequestPayloadMaxSizeInKB -1
    Wait Time for Reconnection
    Use this property to set the time to reconnect socket to BTListener.
    WaitTimeForReconnectInSeconds 30
    Max Size of the Dump Response Payload
    Use this property to limit the response payload or body capture size to capture complete payload or body part.
    DumpResponsePayloadMaxSizeInKB -1
    Dump Full or No Payload Required
    Use this property to dump either complete or no request/response payload or body part to dump the payload as per limit size.
    DumpFullOrNoPayloadRequired 0
    TCP Client Host and Port
    Use this property to define the Host and IP where the plugin data needs to be dumped.
    TcpClientHostAndPort 10.52.38.233:8000;
    Supported Request Content Types
    Use this property to list the supported request content types for payload reporting with " " as a delimiter.
    SupportedRequestContentTypes application/x-www-form-urlencoded text/xml application/xml application/json
    Supported Response Content Types
    Use this property to list the supported response content types for payload reporting with " " as a delimiter.
    SupportedResponseContentTypes text/html text/plain text/xml application/xml application/json text/css
    Max Payload Captured Size
    Use this property to cap the max payload to capture.
    MaxPayLoadCapturedSizeinKB 1; (1 * 16* 1024 bytes (16 kb))
    Filter Image URL
    Use this property to capture all images or capture images based on content type.
    FilterimageurlFlag 0
    To capture all images, set the property as
    FilterimageurlFlag 1.
    To capture images based on the content type, set the property as
    FilterimageurlFlag 0.
  11. Restart the Nginx Web Server.
    service nginx restart