Analyzer ngx-dump-req
Name
ngx-dump-req - Dump Nginx Request
This analyzer captures detailed information about HTTP requests and responses in Nginx-based web servers including OpenResty and Kong. It samples requests matching specific criteria such as host, URI, or status code, dumping request headers, request bodies, and response headers as configured. The analyzer provides tabular output for detailed inspection of HTTP transactions, helping troubleshoot application errors, security issues, and unexpected behavior.
Resource Category
Network I/O.
Application Type & Technical Stack
- OpenResty
- Kong
- APISIX
Command Line Syntax
The analyzer can be invoked directly on the command-line via the orxray
utility from the openresty-xray-cli software package.
Alternatively, the analyzer can also be invoked manually or automatically on the web console UI of OpenResty XRay (like on the Advanced web page).
# PID is the target process PID.
orxray analyzer run ngx-dump-req -p PID
# trace a shell command directly
orxray analyzer run ngx-dump-req -c SHELL_CMD
# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run ngx-dump-req -p -PGID
# trace any processes started from the specified executable path.
orxray analyzer run ngx-dump-req --exe /path/to/exe/file
Tracing Multiple Processes
Supported.
Output Formats
- Tables
- Plain Texts
Output Example
[
{
"title": "Total number of matching requests 3",
"type": "table",
"ver": 1,
"data": [
[
"Index",
"Request Header",
"Request Body",
"Response Header"
],
[
"1",
"GET /rpc-server HTTP\/1.1<br>Connection: Upgrade<br>",
"Body Data:<br><br>Body In File:<br>",
"HTTP\/1.1 403 Forbidden<br>Date: Thu, 04 Dec 2025 15:26:51 GMT<br>Content-Type: text\/html<br>Content-Length: 150<br>Connection: keep-alive<br>Server: OpenResty<br>Strict-Transport-Security: max-age=31536000; includeSubDomains<br>X-Frame-Options: SAMEORIGIN<br>X-Content-Type-Options: nosniff<br>Referrer-Policy: strict-origin-when-cross-origin<br>Permissions-Policy: ch-ua-arch=*, ch-ua-bitness=*, ch-ua-full-version=*, ch-ua-full-version-list=*, ch-ua-model=*, ch-ua-platform=*, ch-ua-platform-version=*<br>Content-Security-Policy: img-src * data:;<br>Cache-Status: BYPASS<br>"
],
[
"2",
"GET /rpc-server HTTP\/1.1<br><br>Connection: Upgrade<br>",
"Body Data:<br><br>Body In File:<br>",
"HTTP\/1.1 403 Forbidden<br>Date: Thu, 04 Dec 2025 15:27:21 GMT<br>Content-Type: text\/html<br>Content-Length: 150<br>Server: OpenResty<br>Strict-Transport-Security: max-age=31536000; includeSubDomains<br>X-Frame-Options: SAMEORIGIN<br>X-Content-Type-Options: nosniff<br>Referrer-Policy: strict-origin-when-cross-origin<br>Permissions-Policy: ch-ua-arch=*, ch-ua-bitness=*, ch-ua-full-version=*, ch-ua-full-version-list=*, ch-ua-model=*, ch-ua-platform=*, ch-ua-platform-version=*<br>Content-Security-Policy: img-src * data:;<br>Cache-Status: BYPASS<br>"
],
[
"3",
"GET /rpc-server HTTP\/1.1<br>Connection: Upgrade<br>",
"Body Data:<br><br>Body In File:<br>",
"HTTP\/1.1 403 Forbidden<br>Date: Thu, 04 Dec 2025 15:27:41 GMT<br>Content-Type: text\/html<br>Content-Length: 150<br>Server: OpenResty<br>Strict-Transport-Security: max-age=31536000; includeSubDomains<br>X-Frame-Options: SAMEORIGIN<br>X-Content-Type-Options: nosniff<br>Referrer-Policy: strict-origin-when-cross-origin<br>Permissions-Policy: ch-ua-arch=*, ch-ua-bitness=*, ch-ua-full-version=*, ch-ua-full-version-list=*, ch-ua-model=*, ch-ua-platform=*, ch-ua-platform-version=*<br>Content-Security-Policy: img-src * data:;<br>Cache-Status: BYPASS<br>"
]
]
}
]
Author
The OpenResty Inc. Team.
Copyright
Copyright (C) by OpenResty Inc. All rights reserved.