Open ghost opened 6 years ago
GoAccess uses a WebSocket connection to get the data from the server real-time. Refreshing the page won't change anything unless you are generating a new static report every X seconds/minutes.
BTW, what SSL error are you getting? You should be able to run goaccess without a wss connection, just don't pass any of the --ssl-*
options.
Ah, that explains! Wrong assumption at my side :-) I have now created an hourly cronjob, that will work out for me.
However the use of websockets looks cool and would be nice to have. Unfortunately I cannot run the apache webserver that serves the report.html on http and when I tried to have the websockets on http my browser refused to mix the secure and non-secure content on the same page.
The ssl error I get is a failed ssl handshake, it was visible in the webbrowser console. It looked like it was a sslv3 which was not accepted by the browser. Unfortunately I don't know how to validate which ciphers/protocol versions are provided by the websocket server.
Unfortunately I cannot run the apache webserver that serves the report.html on http and when I tried to have the websockets on http my browser refused to mix the secure and non-secure content on the same page.
You are right, it won't let you serve mix content. I'm curious to know what output do you get by building goaccess with --enable-debug
and then running goaccess straight from the command line and accessing the report from your browser. Thanks.
In case this is useful, here's how I got websockets working.
localmachine:$ SSH you@yourserver.com -L7890:localhost:7890
yourserver:$ goaccess -g access-live.log -q -o ~/goaccess.html --real-time-html --log-format=COMBINED
Now leave that terminal as-is and in a 2nd terminal,
localmachine:$ scp you@yourserver.com:goaccess.html ./
Then simply open that goaccess.html
file in your browser. The browser then goes to localhost:7890 for an insecure websocket, but the traffic is tunneled by your SSH to the server where goaccess is running. So now you have:
@artfulrobot thanks for sharing that!
I run goaccess on an ubuntu/apache server. Apache serves some static content over https only.
Goaccess is started by a systemd service and running in daemon mode:
In goaccess.conf I have:
Now my websockets don't work because of an ssl handshake error. I can live without this functionality because it is okay for me to just press F5 in my webbrowser.
But why doesn't the report get updated when I press F5?