[rrd-users] More comfortable chart display

Tobias Oetiker tobi at oetiker.ch
Sun Jan 25 19:35:28 CET 2009


Hi Martin,

Today Martin Sperl wrote:

> Well, Alex - there is an approach for you...
>
> As for graphv, nice - it gives the basic information and could be used to add
> this information external to rrdtool - I still think it would be "nicer" to
> have rrdtool do it in a standardized way without having to reinvent the wheel
> repeatedly...
>
> On closer inspection I would say that something is missing from the output of
> graphv, which could introduce problems: the min/max time is not given!
> Imagine, that we create an initial graph with the parameters: "--start -2weeks
> --end now" the javascript also would need to translate "-1week" and "now" back
> to a real time and it could do it differently  than rrdtool (e.g: using the
> wrong timezone for conversion, or the more complex translation cases that
> rrdtool handles "-1day+6hours", ...)
>
> So maybe we should add this to the output of graphv as well for completeness.

good point ... something like this ?

--- rrd_graph.c (revision 1737)
+++ rrd_graph.c (working copy)
@@ -3115,6 +3115,10 @@
     grinfo_push(im, sprintf_alloc("image_width"), RD_I_CNT, info);
     info.u_cnt = im->yimg;
     grinfo_push(im, sprintf_alloc("image_height"), RD_I_CNT, info);
+    info.u_cnt = im->start;
+    grinfo_push(im, sprintf_alloc("graph_start"), RD_I_CNT, info);
+    info.u_cnt = im->end;
+    grinfo_push(im, sprintf_alloc("graph_end"), RD_I_CNT, info);

     /* get actual drawing data and find min and max values */
     if (data_proc(im) == -1)


cheers
tobi
>
> Otherwise we will again need to add it separately by calling RRDs::times and
> "enriching" the graphv output  with this information. But then as this is 2
> different calls to RRD, you will potentially get slight deltas, depending on
> the sequence and the complexity of the graphs (graphs with more than 1000 DEFs
> take some time to generate;)
>
> Ciao,
>          Martin
>
> Tobias Oetiker wrote:
> > Hi Martin,
> >
> > as for the javascript part, there is code for this in smokeping ...
> >
> > getting more meta information from rrdtool is also implemnted
> > through the graphv call.
> >
> > check it out!
> >
> > cheers
> > tobi
> >
> >
> >
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-users mailing list