QUICK FIND

搜索站点内容

输入关键词开始搜索,无需连接服务器。

⌘ K 随时打开,按 Esc 关闭

记录下goaccess分析nginx日志

记录下定时分析的脚本

安装请查看: https://github.com/allinurl/goaccess

配置文件 很多配置具体可以查看goaccess github

time-format %H:%M:%S
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"

config-dialog false

hl-header true

json-pretty-print false

no-color false

no-column-names false

no-csv-summary false

no-progress false

no-tab-scroll false

with-mouse false

agent-list false

with-output-resolver false

http-method yes

http-protocol yes

no-query-string true

no-term-resolver false

444-as-404 false

4xx-to-unique-count false

all-static-files false

double-decode false

ignore-crawlers false

crawlers-only false

ignore-panel REFERRERS
ignore-panel KEYPHRASES

real-os true

static-file .css
static-file .js
static-file .jpg
static-file .png
static-file .gif
static-file .ico
static-file .jpeg
static-file .pdf
static-file .csv
static-file .mpeg
static-file .mpg
static-file .swf
static-file .woff
static-file .woff2
static-file .xls
static-file .xlsx
static-file .doc
static-file .docx
static-file .ppt
static-file .pptx
static-file .txt
static-file .zip
static-file .ogg
static-file .mp3
static-file .mp4
static-file .exe
static-file .iso
static-file .gz
static-file .rar
static-file .svg
static-file .bmp
static-file .tar
static-file .tgz
static-file .tiff
static-file .tif
static-file .ttf
static-file .flv

定时执行的脚本

#!/bin/bash
LANG="zh_CN.UTF-8"
goaccess /www/wwwlogs/xxx.log -o "/www/goaccess/`date +%Y%m%d`-index.html" -p /www/goaccess/goaccess.conf
Conversation

讨论这篇内容

评论由 GitHub Discussions 提供 · 打开讨论仓库