In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about sample analysis based on nginx access log format. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
In the nginx.cnf of nginx, use the log_format field to specify the format file of the log.
Log.fromat:
Log_format access'[$time_local] | $host | $remote_addr | $request | $request_time | $body_bytes_sent | $status |'| $upstream_addr | $upstream_response_time | $upstream_status |'"$http_referer" | "$http_user_agent"'
The fields correspond to:
Time_local local timestamp
Host request host address
Remote_addr remote request address
Request request uri
Total time of request_time for the entire request
Body_bytes_sent request file content size
Status http request status
The address of the service provided by the upstream_addr backend (that is, the destination address for forwarding processing)
Response time of upstream when upstream_reponse_time request
Upstream_status upstream statu
Http_refer url jump source
UserAgent of http_user_agent user terminal browser
For example
[18/Feb/2017:19:16:59 + 0800] | test.xyz | 115.33.60.172 | POST / api/1.1/device/info HTTP/1.1 | 0.003 | 43 | 200 | 127.0.0.1 POST 6000 | 0.003 | "-" | "Apache-HttpClient/UNAVAILABLE (java 1.4)"
Therefore, according to the log of access, we can judge the status of the request and the amount of data requested, and according to the target address, we can judge whether the forwarding rule of nginx is configured successfully.
Thank you for reading! This is the end of this article on "sample Analysis based on nginx access Log format". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.