nginx 日誌變數含義

來源:互聯網
上載者:User

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.