Thanks for the tip dsudell. My RRD is a bit rusty-
-trey On Thu, Oct 9, 2008 at 10:54 AM, dsudell <[EMAIL PROTECTED]> wrote: > > g3vt wrote: >> >> On a somewhat related note.... Has anybody been able to combine >> multiple datapoints in a perf graph and then plot that sum on the same >> graph? Example- We have power distribution units that report load on >> 3 different branches. We'd like to be able to graph the total load as >> a sum of the 3 branches- (and even better alert on total load... but i >> believe I read that's not possible at the moment) >> > > > For a single device, with all the data points in the same template, that's > actually pretty simple. Let's assume that you are able to create a graph > that polots the three branches. I'll assume the data points are called > branch_a, branch_b and branch_c, but names don't really matter so long as you > are consistant. If you look at the graph commands, you'll see something like > > > Code: > > DEF:branch_a-raw=rrdPath/branch_a.rrd:ds0:AVERAGE > CDEF:banch_a-branch_a-raw > LINE1Lbranch_a-raw#0000ff:branch a > ... > DEF:branch_b-raw=rrdPath/branch_b.rrd:ds0:AVERAGE > CDEF:banch_b-branch_b-raw > LINE1Lbranch_b-raw#0000ff:branch b > ... > DEF:branch_c-raw=rrdPath/branch_c.rrd:ds0:AVERAGE > CDEF:banch_c-branch_c-raw > LINE1Lbranch_c-raw#0000ff:branch c > > > > > You can add custom graph points. So first, add a CDEF called all_branches > and define the rpn as > > Code: > branch_a-raw,branch_b-raw,+,branch_c-raw,+ > > > that is just sum up the values from the rrd files. Then plot that using a > line or area or what ever whose value is the name of the CDEF that is the > sum. see http://oss.oetiker.ch/rrdtool/doc/rrdgraph_rpn.en.html for all the > details. But in this case we're just summing three values, so the + > operator does it all. If you don't want to graph the individual values, set > them to display none. That will drop out the LINE defintions, but still make > the values availiable. You should end up adding something like > > Code: > > CDEF:all_branches=branch_a-raw,branch_b-raw,+,branch_c-raw,+ > LINE1:all_branches#FF0000:combined output > > > > > To contrast this with my origional question, this one's easy because the > paths of the RRD files are predictable, and fixed. The catchsI haven't > figured out for combining devices are two: First how know either the > rrdpaths or the names of the auto-generated DEFS in the final call to > rrd_graph. Second, and likely the kicker, how dynamically generate the RPN > for some variable set of devices (ie not for three devices I can name, but > for 'all the devices in this device class'). > > > > > -------------------- m2f -------------------- > > Read this topic online here: > http://forums.zenoss.com/viewtopic.php?p=26157#26157 > > -------------------- m2f -------------------- > > > > _______________________________________________ > zenoss-users mailing list > [email protected] > http://lists.zenoss.org/mailman/listinfo/zenoss-users > _______________________________________________ zenoss-users mailing list [email protected] http://lists.zenoss.org/mailman/listinfo/zenoss-users
