allinurl / goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
https://goaccess.io
MIT License
17.78k stars 1.09k forks source link

Real Time HTML will the page refresh data automatically or must I refresh on the browser? #2640

Closed lzplzp886 closed 3 months ago

lzplzp886 commented 3 months ago
          Great to hear it worked. Yes, the actual generated html report won't change, it updates the data via a WebSocket connection and through Javascript the report is visually updated.

Originally posted by @allinurl in https://github.com/allinurl/goaccess/issues/2341#issuecomment-1163579010

Hi I wanna ask, what is the right behavior I should expect below, as for now if I wanna see the latest data I must manually refresh the browser to get it:

While I keep the browser running, while the page dynamically updates itself per second(right top counter keeps ticking) or when there's new log data comes to the file. Or I must manually refresh the browser to get the latest report data?

H1r0Sh1mA commented 3 months ago

@lzplzp886 the data counters on page should refresh automatically. In order to do so you need to setup web socket configuration (--wss-url=<[scheme://]url[:port]>) If it is all set up correct, then you will see the green dot under the gear icon on the left-side panel, which means that the data flow is online.

lzplzp886 commented 3 months ago

@lzplzp886 the data counters on page should refresh automatically. In order to do so you need to setup web socket configuration (--wss-url=<[scheme://]url[:port]>) If it is all set up correct, then you will see the green dot under the gear icon on the left-side panel, which means that the data flow is online.

Hi,

Thanks for the help. I do saw the green dot but the counter not refreshing automatically.

So my host name is https://www.xxx.com and when I move the mouse to that dot it shows connected to wss://www.xxx.com:7890. Any idea?

https://prnt.sc/V1JkRNJes27A

H1r0Sh1mA commented 3 months ago

@lzplzp886 You could try to debug the problem by lookup in to the browser's dev console. All the auto requests-responses will be there.

rc5hack commented 3 months ago

when I move the mouse to that dot it shows connected to wss://www.xxx.com:7890

Do you run goaccess with docker/docker-compose or not? If yes, maybe you don't exposing ws/wss port properly. Please show how do you run goaccess (command, docker-compose yaml config, etc).

lzplzp886 commented 3 months ago

@lzplzp886 You could try to debug the problem by lookup in to the browser's dev console. All the auto requests-responses will be there.

Seems no errors on dev console. Everything loaded.

lzplzp886 commented 3 months ago

when I move the mouse to that dot it shows connected to wss://www.xxx.com:7890

Do you run goaccess with docker/docker-compose or not? If yes, maybe you don't exposing ws/wss port properly. Please show how do you run goaccess (command, docker-compose yaml config, etc).

Didn't use docker :(

rc5hack commented 3 months ago

Please show how do you run goaccess (full command with all args).

allinurl commented 3 months ago

@lzplzp886 As mentioned by @rc5hack, could you please show how you are running GoAccess? Additionally, can you confirm that your access.log is being updated? For example, you can use the tail -F access.log command. Also, take a look at the network panel in the browser's developer tools and check the WebSocket (WS) connection. It should display the data flowing through the pipe.

lzplzp886 commented 3 months ago

@lzplzp886 As mentioned by @rc5hack, could you please show how you are running GoAccess? Additionally, can you confirm that your access.log is being updated? For example, you can use the tail -F access.log command. Also, take a look at the network panel in the browser's developer tools and check the WebSocket (WS) connection. It should display the data flowing through the pipe.

Thanks for the help. I figured it out. So apparently access.log only being updated when request on visitor's side terminated. So I do see the page refreshed automatically after access.log being updated. :)