標籤: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 日誌變數含義