Linux command
goaccess 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Analyze
goaccess [path/to/logfile1] [path/to/logfile2] ...
Example
goaccess [path/to/logfile] --log-format=[format|combined]
Example
tail -f [path/to/logfile] | goaccess -
Example
goaccess [path/to/logfile] -o [path/to/file.html] --real-time-html
说明
goaccess is an open-source real-time web log analyzer and interactive viewer. It parses web server logs (Apache, Nginx, etc.) and displays statistics in a terminal dashboard or generates HTML/JSON/CSV reports. Features include real-time analysis with streaming logs, geolocation lookup, user agent parsing, and detailed metrics for visitors, requests, referrers, 404 errors, operating systems, and browsers. The interactive terminal mode provides a ncurses-based dashboard with drill-down capabilities. HTML reports can update in real-time via WebSocket connections.
参数
- -o, --output _FILE_
- Output to specified file (HTML, JSON, or CSV based on extension)
- --log-format _FORMAT_
- Specify log format string or use predefined: COMBINED, COMMON, etc.
- --real-time-html
- Enable real-time HTML report updates via WebSocket
- --ws-url _URL_
- WebSocket URL for real-time HTML
- -a, --agent-list
- Enable full user-agent parsing
- -d, --with-output-resolver
- Enable IP resolver for geolocation
- -e, --exclude-ip _IP_
- Exclude specific IP from statistics
- --ignore-panel _PANEL_
- Ignore specific panel in output
- --geoip-database _FILE_
- GeoIP database for geolocation
FAQ
What is the goaccess command used for?
goaccess is an open-source real-time web log analyzer and interactive viewer. It parses web server logs (Apache, Nginx, etc.) and displays statistics in a terminal dashboard or generates HTML/JSON/CSV reports. Features include real-time analysis with streaming logs, geolocation lookup, user agent parsing, and detailed metrics for visitors, requests, referrers, 404 errors, operating systems, and browsers. The interactive terminal mode provides a ncurses-based dashboard with drill-down capabilities. HTML reports can update in real-time via WebSocket connections.
How do I run a basic goaccess example?
Run `goaccess [path/to/logfile1] [path/to/logfile2] ...` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o, --output _FILE_ do in goaccess?
Output to specified file (HTML, JSON, or CSV based on extension)