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
18.53k stars 1.11k forks source link

Granular generation of html charts in real-time mode #2744

Closed oddjobz closed 1 month ago

oddjobz commented 1 month ago

Hi, quick question; is it possible to generate html for individual charts, and by implication have the websocket connection just update information for individual charts?

Use-case; we would like to be able to display individual / selected live charts on a user dashboard .. are there any options that might make this possible?

allinurl commented 1 month ago

You could generate individual reports by using --ignore-panel=<PANEL> and choosing the specific panels you want to view in the report while keeping --real-time-html.

oddjobz commented 1 month ago

Ok, that sounds like an interesting option, I'll have a play with that. Many thanks.

oddjobz commented 1 month ago

Ok, quite excited by this option, but as I'm embedding within a dashboard I'm thinking there's likely to be a CSS conflict, so I'm wondering if I can just suck the information from the web-socket and use it for a dashboard-native chart/table. Is there any documentation for the WS API or should I go look at the source? (in context the dashboard pulls from other sources using socketio.js)

allinurl commented 1 month ago

Looks like the easiest way to grab it is through ws://socket_address:7890 using JS.

oddjobz commented 1 month ago

Ok, tvm. I think as per the other issue I'm going to have to grab it server side to get the size down .. :-)