Analyzer ngx-err-log-lvl-distr
Name
ngx-err-log-lvl-distr - Nginx Error Log Level Distribution
Monitors the distribution of error log levels (debug, info, notice, warn, error, crit, alert, emerg) in nginx-based applications. Generates bar charts showing log level frequencies to help assess application health, identify excessive logging that may impact performance, and guide error_log directive tuning.
Resource Category
off-CPU.
Application Type & Technical Stack
- OpenResty
- Nginx
- 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-err-log-lvl-distr -p PID
# trace a shell command directly
orxray analyzer run ngx-err-log-lvl-distr -c SHELL_CMD
# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run ngx-err-log-lvl-distr -p -PGID
# trace any processes started from the specified executable path.
orxray analyzer run ngx-err-log-lvl-distr --exe /path/to/exe/file
Tracing Multiple Processes
Supported.
Output Formats
- Bar Charts
- Plain Texts
Output Example
[{
"title": "Error Log Level Distribution",
"subtitle": "",
"series": {
"data": {"DEBUG": 245, "INFO": 89, "WARN": 34, "ERROR": 12, "CRIT": 1},
"name": "Error Log Write Count"
},
"ver": 1,
"type": "bar"
}]
Author
The OpenResty Inc. Team.
Copyright
Copyright (C) by OpenResty Inc. All rights reserved.