Skip to content

NGINX Diagnostic Package

This page describes how to trigger the automatic collection of data required to troubleshoot issues in a NGINX or F5 NGINX Plus deployment.

NGINX Diagnostic Package is used to obtain additional information needed by F5 Technical Support when troubleshooting your issue.

The package is created by a script that can be downloaded from the nginx.org website.

The script collects the following information:

  • host commands such as ps, lsof, vmstat
  • NGINX configuration files
  • NGINX log files
  • NGINX service information
  • NGINX process information
  • NGINX versions, dynamically linked libraries
  • NGINX Plus API endpoints
  • NGINX Agent logs and configs if NGINX Agent is present
  • F5 WAF for NGINX logs and configs if F5 WAF for NGINX is present

The script does not collect or create:

  • njs scripts
  • Lua scripts
  • Core dumps

The script can be run on most operating systems supported by NGINX and has been tested on the following operating systems:

  • AlmaLinux 9.1
  • Amazon Linux 2
  • CentOS 7
  • Debian 11
  • RHEL 9.1
  • Rocky Linux 9.1
  • SUSE Linux Enterprise Server 15
  • Ubuntu 20.04

To create NGINX Diagnostic Package:

  1. Download the nginx-supportpkg.sh script:

    Terminal window
    wget https://nginx.org/download/nginx-supportpkg.sh
  2. Grant execution permissions to the script:

    Terminal window
    chmod +x nginx-supportpkg.sh
  3. Run the script. The script requires root privileges to run. The script can be run with optional arguments, see Arguments for details.

    Terminal window
    sudo ./nginx-supportpkg.sh

    The created package will be located in the same directory as the current script. It is a .tar.gz archive named according to the file name pattern: support-pkg-<timestamp>.tar.gz.

  4. After the package has been created, it is recommended to extract and review its contents. Use the tar command to extract the archive:

    Terminal window
    tar -xvf support-pkg-1682457903.tar.gz

    The archive contains textual output of all the commands run by the script to make it easier to review the collected data.

The following table lists the arguments you can use to customize the data that needs to be collected based on your NGINX deployment.

ShortLongDescriptionExampleDefault
-h--helpPrints information about the script arguments to stdout.--helpN/A
-d--debugSets bash debug flag.--debugN/A
-o--output_dirThe output directory where the tar archive is saved.-o ~/output$(pwd)
-n--nginx_log_pathThe directory where the NGINX log files are located.-n /var/log/nginx/var/log/nginx
-xc--exclude_nginx_configsExcludes all NGINX configuration files from the support package.--exclude_nginx_configsN/A
-xl--exclude_nginx_logsExcludes all NGINX log files from the support package.--exclude_nginx_logsN/A
-ac--exclude_agent_configsExcludes all NGINX Agent configuration files from the support package.--exclude_agent_configsN/A
-al--exclude_agent_logsExcludes all NGINX Agent logs from the support package.--exclude_agent_logsN/A
-nc--exclude_nap_configsExcludes all F5 WAF for NGINX config files from the support package.--exclude_nap_configsN/A
-nl--exclude_nap_logsExcludes all F5 WAF for NGINX log files from the support package.--exclude_nap_logsN/A
-ea--exclude_api_statsExcludes NGINX Plus API stats from the support package.--exclude_api_statsN/A
-pi--profile_intervalProfiling interval in seconds.-pi 2015

{{}}