码迷,mamicode.com
首页 > 其他好文 > 详细

nginx 日志变量含义

时间:2017-01-05 13:26:57      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:local   ons   war   日志   body   客户端浏览器   orm   变量   http协议   

log_format logstash "remote_addr | $time_local | $request | $status | $body_bytes_sent | "
 "$request_body | $content_length | $http_referer | $http_user_agent | "
 "$http_cookie | $remote_addr | $hostname | $upstream_addr | $upstream_response_time | $request_ time";

 

 1.$remote_addr 与$http_x_forwarded_for 用以记录客户端的ip地址;
 2.$remote_user :用来记录客户端用户名称;
 3.$time_local : 用来记录访问时间与时区;
 4.$request : 用来记录请求的url与http协议;
 5.$status : 用来记录请求状态;成功是200,
 6.$body_bytes_sent:发送给客户端的文件主体内容的大小,比如899,可以将日志每条记录中的这个值累加起来以粗略估计服务器吞吐量。
 7.$http_referer :用来记录从那个页面链接访问过来的;
 8.$http_user_agent :记录客户端浏览器的相关信息;

9.$request : 请求内容

10.$status :请求状态吗

11.$http_user_agent: 客户端机型

12.$http_cookie客户端的cookie

13. $hostname 本主机服务器主机名

14.$upstream_addr 转发到哪里

15.$upstream_response_time : 转发响应时间

16.$request_time:整个请求的总时间。 

nginx 日志变量含义

标签:local   ons   war   日志   body   客户端浏览器   orm   变量   http协议   

原文地址:http://www.cnblogs.com/python-way/p/6251720.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!