Collect detailed logs for several days

I'm working on a project where I send out a LEDE router and let it be used for some days. After the router is returned, I want to analyze how many users at the same time were connected, and what their throughput was. Also I want to anlyze how many files were downloaded but that's more of a webserver question than a LEDE question.

I downloaded and installed collectd as the documentation suggested. RRDTool is pretty new to me so I don't know how to fine tune the settings. After reading Wikipedia about RRDTool it seems to me that only detailed log values are saved in the last minutes/hours, and after that it gets aggregated and only daily/monthly logs are saved.

My goal is to have detailed logs (every 30 secs, 1 minute or maximum of 5 minutes, depending on the load it takes on the CPU) of only some days. I have to see exactly how many users were connected 2 days ago at 09:05 AM for example.

It's working really well if I use collectd at the default settings, and looking at the graph page (really detailed) but I don't know how to look at an exact time frame, for example x hours ago. I extracted the logs from a device that got returned and placed them on my own device but the question remains: how can I analyze these logs? Is it possible with RRDTool or do I have to look at another package or, when needed, do I have to make a logger myself?

You might want to look at the source code for Munin, specifically the code for munin-cgi-graph.
That does realtime graphing and queries of rrd files.

RRD files are all but detailed. That's the nature of RRD.

What the threadstarter is searching for: Lossless logging.
If it is only in a small timeframe: OK for RRD, depending on your database setup.
If the task is however to know exact values for a year ago: That's not what RRD is designed for.

Since this logging issue is not really specifically related to LEDE/OpenWrt, one might be better off searching the net for solutions, be it either RRD or munin or something else.

As for RRD: https://oss.oetiker.ch/rrdtool/index.en.html is the source of first choice.

Thanks for the suggestion. I am indeed looking for a kind of lossless logging, however, it's only needed to look back some days. Maybe it's even an idea to rotate the RRD files and make new ones each day.

I only need to save the logs for a couple of days, not weeks or months.

Would RRD still be suitable? Can it be detailed in a timeframe of 24 hours?

Please refer to the RRD documentation.

Alright, the tutorials on the mentioned website were indeed made for beginners. I now tweaked the RRD settings and I have data for 3 days. Works perfectly, thanks! :slight_smile: