[Orca-dev] data accuracy

Jon A. Tankersley jon.tankersley at eds.com
Mon Apr 14 21:13:12 PDT 2003


I've taken a crack at allowing the config file to specify an option to
pass
to rrdtool for other consolidation functions instead of AVERAGE, but
I've run
into a snag.

Given a new plot sub-command of
    cf    [AVERAGE|MAX|MIN]  (default is AVERAGE, how it works today)
I can get the plot stuff to identify the the 'cf' tag, but I can't seem
to
get RRDFile to see the plot_ref->{cf} tag.
It is set up so that a data VALUE can be MAX/MIN, not all data, though a

global setting would be much easier to build in.

For now, I'm just building BOTH AVERAGE and MAX (hardcoded because of
the
problem), if I can get it to recognize it it will be trivial to add MIN
also.

Any ideas how to get RRDFile to recognize the ImageFile::plot_ref
structure?

if (defined $ImageFile::plot_ref->{cf}[$i]) {     # ask for max only
        push(@options,
"RRA:MAX:0.5:$rra_pdp_count:$RRA_ROW_COUNTS[$i]");
} else {                                          # not set, default avg

        push(@options,
"RRA:AVERAGE:0.5:$rra_pdp_count:$RRA_ROW_COUNTS[$i]");
        # until it can be properly determined.... add MAX also.
        push(@options,
"RRA:MAX:0.5:$rra_pdp_count:$RRA_ROW_COUNTS[$i]");
}


Any ideas?




More information about the Orca-dev mailing list