我需要使用--real-time-html选项运行多个goaccess进程来分析多个日志。 我的命令是:
/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
...
只有1个进程在运行时,一切正常,我可以在Chrome上看到websocket的数据帧,每个数据帧的长度通常相同;
但是当两个或多个进程正在运行时,发生了两件事:
似乎即使我使用“ --port”选项运行goaccess进程来为每个WebSocket进程指定不同的端口,多个websocket服务仍然混杂在一起。
答案 0 :(得分:0)
要运行多个实例,您需要确保以下内容:
--port
上运行每个实例。--fifo-in=/path/in.1 --fifo-out=/path/out.1
。--db-path=/path/instance1/
来存储数据库文件的其他路径。示例:
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