[rrd-users] Hiding data + legend in STACK graph when no data found
b.barr at f5.com
Thu Dec 13 23:01:27 CET 2012
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.
However I'm interested in how you are retrieving the data from the ESX. I've recently started running said servers too, and would like to do similar graphs.
From: rrd-users-bounces+b.barr=f5.com at lists.oetiker.ch [rrd-users-bounces+b.barr=f5.com at lists.oetiker.ch] on behalf of Tom Payerle [payerle at umd.edu]
Sent: Thursday, December 13, 2012 9:56 AM
To: rrd-users at lists.oetiker.ch
Subject: [rrd-users] Hiding data + legend in STACK graph when no data found
Is there a way in RRD graphing language to conditionally display a line (and
the associated legend)? I.e., if I have a graph displaying several variables
over a time period, but not all variables are defined over all time periods,
is there a way to programmatically (within the rrd graphing language) suppress
the plotting of a given variable (and perhaps more importantly, suppress its
listing in the legend) if the variable does not have any values over the whole
time period in question.
In particular, I have a VMware ESX container system with a bunch of virtual
guests on it, and I am collecting statistics related to the ESX host broken
down by guest. E.g., memory consumed by each guest while it is on that
I have a perl script which gets the list of virtual guests based on the
RRD files that exist, and produces a stacked area graph showing all the
memory consumed on that ESX host broken down by the guest consuming it.
The perl script at this time just does the relevant DEF,CDEF,VDEF,LINE,AREA,
etc. commands --- it does NOT specify the time range (which is currently
handled at a higher level).
For the most part, things are working. However, the guest VMs sometimes
get migrated from one ESX container to another (the statistics in question
pertain to the ESX container, so I do not want these statistics to migrate
with the host but to remain with the container), and a graph will often end
up with a lengthy legend referring to VM guests which were not on the host
(and therefore no data was collected in the rrds) in the referenced time
I.e., I would like something like
IF plotx THEN
That is, draw x (and put "x" in the legend) only if plotx is nonzero/1,
and plot nothing otherwise.
Alternatively, if there is someway to conditionally nullify the label
for the x line if plotx is not true, and/or set the color for the x variable
to invisible/undef if plotx is not true. (I am not particularly concerned
about the drawing of the line it self; I can't remember if the undef values
are skipped or treated as 0, and I can certainly force treating as 0; but
as migrating VMs between hosts is not uncommon, our legends are quickly getting
Does anyone have any suggestions? Thanks in advance.
rrd-users mailing list
rrd-users at lists.oetiker.ch
More information about the rrd-users