Analyzer ngx-req-status-code
Name
ngx-req-status-code - Request Status Code Per Second
This analyzer monitors HTTP response status codes generated by Nginx-based applications such as OpenResty and Kong. It tracks the distribution of status codes (2xx, 3xx, 4xx, 5xx) over time, providing real-time visibility into request success rates, client errors, and server errors. The analyzer generates line charts showing status code trends per second, helping identify anomalies, error spikes, or changes in traffic patterns that may indicate application issues or attacks.
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-req-status-code -p PID
# trace a shell command directly
orxray analyzer run ngx-req-status-code -c SHELL_CMD
# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run ngx-req-status-code -p -PGID
# trace any processes started from the specified executable path.
orxray analyzer run ngx-req-status-code --exe /path/to/exe/file
Tracing Multiple Processes
Supported.
Output Formats
- Line Charts
- Plain Texts
Output Example
{
"data": {
"http": {
"200": 0.2
},
"time": 5
},
"kind": "req-status"
}
Author
The OpenResty Inc. Team.
Copyright
Copyright (C) by OpenResty Inc. All rights reserved.