Stream server logs on API


i stumbled upon the serverlog import script, feeding logs to Matomo. It seems to use the Tracking API, which is kind of the same as used by the js tracking scripts, if I understood things correctly.

However, the approach seems to be parsing a file, that will not change further and feed all log points to Matomo.

Ideally we would like to stream logs to matomo to have near live updates.

Would is be possible to see the results immediatly, after feeding the tracking api, or is there cron aggregations running inside Matomo?
Has anyone used this approach already, for example feeding from fluentd, or fluentbit’s configured http output?

thanks and kind regards, Steve

The visits log should display the result immediately, but for other reports, you’ll have to wait for the archiving process to be done…

Thanks, @heurteph-ei , do you know, if the import script would trigger an archiving process?

In my opinion, the import script and the archiving process are disconnected…
@innocraft, am I right?

Hi @ste ,

Importing server logs will not trigger the archiving process, if auto archiving was setup, it will be triggered based on when it is configured to be triggered, if auto archive is not setup then it will be triggered when you try to access the report from the UI, second approach is not recommended if you have lot of data as it will impact the performance and may time out at times.