Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time distribution lagging behind #2777

Open
RagnarGrootKoerkamp opened this issue Jan 2, 2025 · 3 comments
Open

Time distribution lagging behind #2777

RagnarGrootKoerkamp opened this issue Jan 2, 2025 · 3 comments

Comments

@RagnarGrootKoerkamp
Copy link

RagnarGrootKoerkamp commented Jan 2, 2025

I'm using the html live-view version via websockets, and looking at the 'time distribution' plot with 10 minute intervals.

Currently, the data go from 01:3 to 13:2, even though by now the time is 14:05.

It seems that the table and plot only include the top 50 rows, instead of all datapoints. Note how in the plot below, the x-axis labels are not exactly linear. The should each be 50 minutes apart, but towards the end they are a few hours apart instead, and for example there is not a single data point with 10:?.
The 'total' of the data columns is 144=24*6, so internally all rows are known, but the web UI never sees more than 50.

image

In fact, the same may be true for the 'unique visitors per day' table (when sorted per hour). The table has 50 rows of data, while the total number of rows is 52.

Edit: I found #max-items 366 in the config file. I uncommented that and restarted goaccess, but the number of rows shows is still 50.

@RagnarGrootKoerkamp
Copy link
Author

Oh I found in man goaccess that it's limited to 50 for real-time html.

Then, is there some way to read the generated index.html with 366 rows per table without auto-refreshing to the limited output?

@allinurl
Copy link
Owner

allinurl commented Jan 4, 2025

Yes, in real-time, the maximum is set to 50. However, you can use --max-items=366 if you're not using it in real-time. Perhaps we could make this more specific to certain panels, what do you think? by the way, this limit helps reduce the payload size sent over the network each time new data is parsed.

@RagnarGrootKoerkamp
Copy link
Author

RagnarGrootKoerkamp commented Jan 4, 2025

by the way, this limit helps reduce the payload size sent over the network each time new data is parsed.

Yes, makes sense. I'm not quite sure, but do panels only refresh while they're in view? On mobile it seems some graphs only update from the static to the live version once I scroll them into view.

Yes, in real-time, the maximum is set to 50. However, you can use --max-items=366 if you're not using it in real-time. Perhaps we could make this more specific to certain panels, what do you think?

A few options:

  • workaround: what I did for now is to simply create a second one-shot systemd service that has the live-html disabled and outputs index-static.html, so I can just go there and run that second script when needed. Slightly inefficient though since I have to wait a minute for the parsing to happen, and now I have twice pretty much the same html file.
  • separate static output: Add a --static-output /path/to/static.html that writes basically the same html, but with the refreshing disabled
  • refresh toggle: Add a toggle to the generated file to disable the websockets refresh and instead show the full index.html.
  • full-data button: Add a button that requests the full 366 items for each panel, and then pauses the websocket-refresh until that it enabled again.

The workaround is kinda fine, but the others are all nice to have, with the last one the nicest I'd say.


I also realized I slightly misinterpreted the time graph as 'last 24 hours' rather than 'time-of-day distribution of visitors'. Maybe that description could be slightly clearer.


I did a little writeup on installing goaccess here: https://curiouscoding.nl/posts/goaccess-setup/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants