Skip to content

[Feature] Display upstream information in website logs and the access analytics panel for reverse proxy scenarios. #13363

Description

@yyg-max

1Panel Version

v2.2.3

Please describe your needs or suggestions for improvements

目前的 “网站监控 -> 请求日志” 可视化面板,只能解析标准的 Nginx 访问请求(如客户端 IP、耗时、状态码 200 等)。当发生节点故障转移时,面板上看起来一切正常,但作为管理员,完全无法从请求日志的列表中看出这个请求最终落在了哪台具体的后端机器上。整个负载均衡的路由调度过程是一个“黑盒”,非常不利于排查单点故障。

Please describe the solution you suggest

建议 1Panel 在未来的版本中,对反向代理类网站的监控日志展示进行增强:

修改默认日志格式:在 Nginx 的全局 log_format 中,增加记录与后端交互的核心变量,例如 $upstream_addr(后端节点 IP 与端口)、$upstream_status(后端返回状态码)以及 $upstream_response_time(后端响应时间)。

面板字段展示:在 “网站监控 -> 请求日志” 的可视化数据表格中,增加 “处理节点 (Upstream)”、“节点状态” 等列,或在点击“详情”时展示这些 $upstream_ 变量。

Additional Information

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions