当前位置: 首页 > 工具软件 > GoAccess > 使用案例 >

goaccess 分析nginx拼接的json日志

邵奇
2023-12-01

#goaccess.conf

time-format %T

date-format %Y-%m-%d

log-format %^:"%h",%^,%^,"time_local":"[%dT%t+%^]",%^,%^,"request_uri":"%U",%^,"request_method":"%m","request_time":"%T","status":"%s",%^,%^,"http_referer":"%R","http_user_agent":"%u"

更多自定义方法:

GoAccess - Manual Page

{"name":"test","remote_addr":"1.1.1.1","remote_user":"","time_local":"[2022-10-14T00:00:14+08:00]","request":"POST /test HTTP/1.1","request_ID":"","request_uri":"/test","appversion":"","request_method":"POST","request_time":"0.005","status":"200","body_bytes_sent":"xxx","request_length":"xxxx","http_referer":"https://www.laoweng.com/","http_user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/106.0.0.0 Safari/537.36"}

Geoip:

Free updated GeoIP legacy databases

 类似资料: