This will be relatively easy to implement but it is important. Make smbtaquery create a usage list / or graph (in HTML) resembling the same information that can be created with rrddriver via rrdtool. It will allow to dig on usage informaion in the past, or specific time sets. This will not replace rrddriver, as rrddriver consumes real time data, but it is a must-have for smbtaquery.
This is exactly what the usage function should do, but currently the "usage" function in smbtaquery does "create a virtual day and shows the average usage on this typical day". So it is doing different than what is proposed in the first paragraph of this bug description.
Therefore, I suggest to rename the "usage" function to "average_usage", and implement the function suggested here as the new "usage" function.
I'll write a lightweight graphics engine by using the pango libraries to support this. It will be specialized on SMBTA and therefore can be used for any diagrams we want to support in functions.
Output will be PNG or any other format pango supports.
The diagram itself is extremly simple to create, and so I guess it will not take long time to create the function. Another question is however how to host this graphic for webSMBTA. My first try will be to hardcode the graphic as inline in the HTML output. Any modern browser supports this.
more difficult than I thought. Will take some time.
95a0b7523ab496d19d38df6fd544af89a4d58ed7 is step 1. It renames the "usage" function to "24h_usage". Benjamin, please keep that in mind it needs a change in websmbta.
Changed in websmbta with
Author: Benjamin Brunner <email@example.com>
Date: Fri Sep 9 12:09:25 2011 +0200
Fixed help for smbtaquery
[websmbta]Moved usage to 24h_usage function
I propose our output will be embbedable and resizeable SVG vectorgraphics.
compiling code is now in the devel branch. My next steps are testing the function with a decend set of data.
trying to get the virtual machines up to date to test this function. At the moment I have not that much time available for SMBTA.
basic work is done. The current function creates a SVG file that can be viewed in a browser. Todo here is:
- create a scaling / legend
- instead of writing to a file, write to memory in cairo. We can then embedd the SVG code in the XML output
I am working on this.
The most pressing thing currently for a 1.2.6 release. I'll be back from US on tomorrow, and begin to tackle this after the jetlag experience.
In favour of a 1.2.6 release of SMBTA, we will move this bug for a 1.2.7 release in future. We have so much long standing features and fixes in the queue for 1.2.6, that it's better to get 1.2.6 out of the door.
This function becomes deprecated with the birth of our QT based querying software.