0

I need to run multiple goaccess processs with --real-time-html option to analyze multiple logs. 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;

But when 2 or more processes are running, 2 things happened:

  1. On the terminal which goaccess processes are running, "SIGPIPE caught!" came out continuously;
  2. On the web page, the dashboard are showing wrong data discontinuously, and I notice that the websocket data frames received by the browser are quite different in length(which means the web page are receiving different websocket data frames from other goaccess processes), when the data frame length are similiar to the data length when only 1 goaccess process is running, the data shown on the web page are right, when the data frame length ars different, the data ares wrong.

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.

1 Answers1

0

To run multiple instances, you need to ensure the following:

  1. Run each instance on a different port --port.
  2. Different pipes (FIFOs) --fifo-in=/path/in.1 --fifo-out=/path/out.1.
  3. (Optionally) IFF you are using the on-disk storage, then you will need different path where the DB files are stored --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

Source

Paul
  • 1