Bug 8207 - Create a function resembling usage diagrams like rrddriver does for smbtaquery
Summary: Create a function resembling usage diagrams like rrddriver does for smbtaquery
Alias: None
Product: smbta
Classification: Unclassified
Component: smbtaquery (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Holger Hetterich
QA Contact:
Depends on:
Reported: 2011-06-04 22:00 UTC by Holger Hetterich
Modified: 2014-04-08 12:43 UTC (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Holger Hetterich 2011-06-04 22:00:34 UTC
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.
Comment 1 Holger Hetterich 2011-09-06 18:25:38 UTC
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.
Comment 2 Holger Hetterich 2011-09-07 22:32:43 UTC
more difficult than I thought. Will take some time.
Comment 3 Holger Hetterich 2011-09-08 17:20:00 UTC
95a0b7523ab496d19d38df6fd544af89a4d58ed7 is step 1. It renames the "usage" function to "24h_usage". Benjamin, please keep that in mind it needs a change in websmbta.
Comment 4 Benjamin Brunner 2011-09-09 10:11:07 UTC
Changed in websmbta with 
commit 5b3db8e84e2458aedb15cb2186772dab3ffb12d4
Author: Benjamin Brunner <bbrunner@suse.de>
Date:   Fri Sep 9 12:09:25 2011 +0200

    Fixed help for smbtaquery
    [websmbta]Moved usage to 24h_usage function
Comment 5 Holger Hetterich 2011-09-09 21:40:54 UTC
I propose our output will be embbedable and resizeable SVG vectorgraphics.
Comment 6 Holger Hetterich 2011-09-10 20:48:11 UTC
compiling code is now in the devel branch. My next steps are testing the function with a decend set of data.
Comment 7 Holger Hetterich 2011-09-15 20:56:26 UTC
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.
Comment 8 Holger Hetterich 2011-09-22 18:26:33 UTC
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.
Comment 9 Holger Hetterich 2011-10-20 01:30:31 UTC
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.
Comment 10 Holger Hetterich 2012-04-04 19:54:21 UTC
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.
Comment 11 Holger Hetterich 2014-04-08 12:43:14 UTC
This function becomes deprecated with the birth of our QT based querying software.