標籤:goaccess
在控制台分析nginx日誌
goaccess -f b.log
產生html檔案分析nginx日誌
vi ~/.goaccessrc
time-format %T
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
各參數詳解: man goaccess
或
Nginx Variable GoAccess Variable
$remote_addr %h
$remote_user %^ (ignored)
$time_local %d:%^
$upstream_cache_status %^ (ignored)
$request %r
$status %s
$body_bytes_sent %b
$http_referer %R
$http_user_agent %u
goaccess -f b.log -p ~/.goaccessrc -a > b.html #開啟瀏覽器訪問
開啟網頁會顯示如下幾項:
1
Unique visitors per day - Including spiders
每天唯一訪客(來自同樣IP、同一日期和同一瀏覽器的請求被認為是是唯一訪問)
2
Requested Files (URLs)
請求的檔案(網頁URL)
3
Static Requests
請求的靜態檔案(例如,.png檔案,.js檔案等等)
4
Not Found URLs (404s)
HTTP 404 未找到的響應代碼
5
Visitor Hostnames and IPs
主機地址(用戶端ip地址)
6
Operating Systems
作業系統
7
Browsers
瀏覽器
8
Time Distribution
時間分布
9
Referrers URLs
引薦網址
10
Referring Sites
參考網站
11
Keyphrases from Google‘s search engine
來自Google搜尋引擎的前幾位的關鍵字
12
Geo Location
地理位置
13
HTTP Status Codes
HTTP 狀態碼
本文出自 “青春鄧勇” 部落格,請務必保留此出處http://dengyong.blog.51cto.com/8409869/1910116
goaccess_nginx日誌分析工具