This page describes how to trigger the automatic collection of data required to troubleshoot issues in a NGINX or F5 NGINX Plus deployment.
Overview
Section titled “Overview”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
Supported Operating Systems
Section titled “Supported Operating Systems”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:
-
Download the
nginx-supportpkg.shscript:Terminal window wget https://nginx.org/download/nginx-supportpkg.sh -
Grant execution permissions to the script:
Terminal window chmod +x nginx-supportpkg.sh -
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.shThe created package will be located in the same directory as the current script. It is a
.tar.gzarchive named according to the file name pattern:support-pkg-<timestamp>.tar.gz. -
After the package has been created, it is recommended to extract and review its contents. Use the
tarcommand to extract the archive:Terminal window tar -xvf support-pkg-1682457903.tar.gzThe archive contains textual output of all the commands run by the script to make it easier to review the collected data.
Arguments
Section titled “Arguments”The following table lists the arguments you can use to customize the data that needs to be collected based on your NGINX deployment.
| Short | Long | Description | Example | Default |
|---|---|---|---|---|
-h | --help | Prints information about the script arguments to stdout. | --help | N/A |
-d | --debug | Sets bash debug flag. | --debug | N/A |
-o | --output_dir | The output directory where the tar archive is saved. | -o ~/output | $(pwd) |
-n | --nginx_log_path | The directory where the NGINX log files are located. | -n /var/log/nginx | /var/log/nginx |
-xc | --exclude_nginx_configs | Excludes all NGINX configuration files from the support package. | --exclude_nginx_configs | N/A |
-xl | --exclude_nginx_logs | Excludes all NGINX log files from the support package. | --exclude_nginx_logs | N/A |
-ac | --exclude_agent_configs | Excludes all NGINX Agent configuration files from the support package. | --exclude_agent_configs | N/A |
-al | --exclude_agent_logs | Excludes all NGINX Agent logs from the support package. | --exclude_agent_logs | N/A |
-nc | --exclude_nap_configs | Excludes all F5 WAF for NGINX config files from the support package. | --exclude_nap_configs | N/A |
-nl | --exclude_nap_logs | Excludes all F5 WAF for NGINX log files from the support package. | --exclude_nap_logs | N/A |
-ea | --exclude_api_stats | Excludes NGINX Plus API stats from the support package. | --exclude_api_stats | N/A |
-pi | --profile_interval | Profiling interval in seconds. | -pi 20 | 15 |
{{}}