You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to obtain a real-time JSON export? I am using a Prometheus for monitoring and I would like to pull JSON, that GoAccess already makes, convert it into Prometheus metrics and store within it to use for alerting and Grafana charts.
Now, there is option to export data into JSON format, and I've seen an example linked in Readme that provides JSON output, but I am unsure how to get it on my instance. I am currently running GoAccess like this:
Great question! A few options come to mind: you could try reading from the named pipe under /tmp, though I’m not entirely sure if that would work. An easier method might be to use something like websocat to read directly from the WebSocket, for example, with websocat ws://your_goaccess_server:7890. You might even be able to do it with curl. It’s also possible to handle this with JavaScript if needed.
For a more direct approach, we’d need to tweak the real-time HTML output format and possibly add something like --real-time-json. However, I'm not sure where the output should be directed.
Having --real-time-json would be great even if it is redirected to a file. Alternatively, maybe you could register URL endpoints that would provide JSON/HTML/CSV output without a need to write to a file on disk?
Hi everybody.
Well, I see ... I think it's very weird write something like JSON at real-time into file on disk.
How to you read this? -- I.E. -- What is moment (in time) that JSON is complete and valid?
Remembering that, at time in time, it is rewrite from scratch !
So, I agree with @allinurl that be use websocket entry, or (in future) create specific entry-point (or API) for that.
Hi!
Would it be possible to obtain a real-time JSON export? I am using a Prometheus for monitoring and I would like to pull JSON, that GoAccess already makes, convert it into Prometheus metrics and store within it to use for alerting and Grafana charts.
Now, there is option to export data into JSON format, and I've seen an example linked in Readme that provides JSON output, but I am unsure how to get it on my instance. I am currently running GoAccess like this:
Thank you!
The text was updated successfully, but these errors were encountered: