[rrd-users] Hiding data + legend in STACK graph when no data found

Ryan kubicaryan at yahoo.com
Fri Dec 14 08:14:54 CET 2012



Sent from my iPhone

On Dec 13, 2012, at 14:41, Tom Payerle <payerle at umd.edu> wrote:

> Brent Barr <b.barr <at> f5.com> writes:
> 
>> Since Python is my weapon of choice, I build up my graph commands as strings
> in python and then send them to the
>> OS to run.  In that environment, I'd just if/else each section from being
> added to the string.
> 
> That's essentially what we are doing (or perhaps directly interfacing with
> RRD's API), but our setup has the time span setting done much later.  I.e.,
> we process all the meat of the graph from command strings, but leave options
> for the web user to specify the time limits and a few other simple things (i.e.
> vertical scaling, etc).
> 
> I only want to suppress the lines if there is no data over the selected time
> period.  I.e. if guest VM foo was running on the container from Sep 1, 2012 to
> Oct 31, 2012, it should show up in a graph of the past year
> (12/13/2011-12/13/2012) but not in a graph of the past month
> (11/13/2012-12/13/2012).  I don't
> have the time slice at the point where I am adding lines to the graph.
> 
> Even if I did, it is more complicated than you make it sound, as my perl/python
> script would have to effectively dump the rrd for that time period and check for
> any valid data.
> 

This is exactly how to handle the request and simple as its just a two step process:

   1) first query is XPORT of the full request and only request total
   2) use the results from XPORT to exclude the data sources  which have no data and build a graph.

Nice thing is that model will support neat things like filter on usage ( ie: give me any vms using more than X ) 


> (VMware question addressed offline)
> 
> 
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users



More information about the rrd-users mailing list