[英]Goaccess show error data on real-time HTML report due to loading wrong data from multiple websocket service
I need to run multiple goaccess processs with --real-time-html option to analyze multiple logs. 我需要使用--real-time-html选项运行多个goaccess进程来分析多个日志。 my commands are:
我的命令是:
/usr/bin/goaccess --real-time-html -o /data/html/log1/index.html -f log/log1.log --port=7890
/usr/bin/goaccess --real-time-html -o /data/html/log2/index.html -f log/log2.log --port=7891
...
when only 1 process is running, everything is ok, and I can see the data frames of websocket on Chrome, every data frame is generally the same length; 当只有一个进程正在运行时,一切正常,我可以在Chrome上看到websocket的数据帧,每个数据帧的长度通常相同;
But when 2 or more processes are running, 2 things happened: 但是,当两个或多个进程运行时,发生了两件事:
It seems like that even I run the goaccess process with "--port" option to specify different port for every WebSocket process, multiple websocket services ares still mixed up. 似乎即使我使用“ --port”选项运行goaccess进程来为每个WebSocket进程指定不同的端口,多个websocket服务也仍然混杂在一起。
To run multiple instances, you need to ensure the following: 要运行多个实例,您需要确保以下几点:
--port
. --port
上运行每个实例。 --fifo-in=/path/in.1 --fifo-out=/path/out.1
. --fifo-in=/path/in.1 --fifo-out=/path/out.1
。 --db-path=/path/instance1/
. --db-path=/path/instance1/
。 Examples : 例子 :
goaccess -f /prod/access.log -o /var/www/html/prod.html --real-time-html --ws-url=192.168.1.2 --port=7890 --fifo-in=/tmp/prod.in --fifo-out=/tmp/prod.out
AND 和
goaccess -f /dev/access.log -o /var/www/html/dev.html --real-time-html --ws-url=192.168.1.2 --port=7891 --fifo-in=/tmp/dev.in --fifo-out=/tmp/dev.out
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.