log analysis of Apache combined format
After visiting the http://211.100.97.250/zabbix/today, I looked at the visit log to see what
Let's take a look at the log format defined in the Apache configuration file:
Customlog "Logs/access_log" combined
Logformat "%h%l%u%t \%r\"%>s%b \ "%{referer}i\" \ "%{user-agent}i\" "combined
I randomly extracted a row to access the log:
114.249.30.56--[12/sep/2011:21:00:42 +0800] "get/zabbix/images/gradients/button.gif http/1.1 1706" http:// 211.100.97.250/zabbix/"" mozilla/5.0 (Windows; U Windows NT 6.1
; ) applewebkit/534.12 (khtml, like Gecko) maxthon/3.0 safari/534.12 "
Log analysis:
IP address of the 114.249.30.56%h client
12/sep/2011:21:00:42 +0800%t Access date and time difference
Get/zabbix/images/gradients/button.gif http/1.1%r "method Resource Protocol"-"Mode resource Agreement"
Way: Get post Head;resource is the document that the viewer requests to the server or Url;protocol is usually HTTP, followed by Version number, usually http/1.1
%>s response please The first line of information asked. 200 indicates that the server has successfully responded to the browser's request and everything is OK
A status code that starts with 3 indicates the client reason the user request was redirected to another location
A status code that starts with 4 indicates that there is some kind of error in the client
A status code that starts with 5 indicates that the server encountered an error
1706%b The number of bytes transmitted ( does not contain HTTP header information)
URL path for http://211.100.97.250/zabbix/%u request (does not contain a query string)
mozilla/5.0 (Windows; U Windows NT 6.1; ) applewebkit/534.12 (khtml, like Gecko) maxthon/3.0 safari/534.12
\ browser-aware information provided by the "%{user-agent}i\" client browser