Leos wrote:
A simple cron job based on GNU find with -mmin could remove the old files.
True - under UNIX. Most users have Windows based systems, though, and some have Applemacs. There is also the problem of how to automate the install in this situation, since even under UNIX you need to work our whose crontabs to put the entries into.
Leos wrote:
Sure, it would be some work to be done. Check SmokePing for inspiration, it does it well.
I believe that Smokeping has to deal with a lot less generality than routers2 has to - consider, for example, the userdefined combination graphs where we would have to identify the intersection of the sample time windows.
Leos wrote:
SmokePing allows the user to click on the graph and brings a simple pre-filled form. It might not be the best solution, but it works fine for me.
I can see you're quite a fan of SmokePing

Actually, I really like the program as well, but it is much easier to provide this sort of facility when you have only one specific form of graph to produce. There are, indeed, several ways to produce a time-selection form, and all of them have their strengths and weaknesses - I need to work out which works the best for the general case.
The largest problem affecting all the options is that of performance, whether in calling multiple instances of the frontend, or in long analysis of the various .rrd files. Since no session information is preserved by the routers2 script, it means that options need either to be passed via the CGI, or re-calculated each invocation, and this would also be the case for checking time windows.
I expect that a future version of routers2 will initially assume that all times are OK, and will attempt to pick an archived .rrd appropriately. Following versions would hopefully be able to be more helpful. Also, I will eventually rewrite the do_graph routine to create the graph at image output time, thus removing the need for the working directory and the crontab entry mentioned in the first place. These are all major-version changes, though, and need to wait for the time to be available.
Another possibility is producing a plugin or companion script to do the time window ananlysis, in a similar way to the way the trend analysis works.