summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralisonjm <alisonjm>2011-06-08 21:24:57 +0000
committeralisonjm <alisonjm>2011-06-08 21:24:57 +0000
commit8ba96f686e98dc592d13457cc4aa82e56e75a6f7 (patch)
tree288a9f31ed0b44669e014db9aaeee8fba1ff594c
parente464fa9eec0d11c80b3542bcdb37ad19de658a14 (diff)
Added new documentation for rrdFilter.js, and updated all other documentation reflecting new changes in javascriptrrd, with major changes being the addition of RRDFilterShift and RRDRRAFilterAvg methods and extension to rrdflot_defaults options.
-rw-r--r--doc/lib/index.html6
-rw-r--r--doc/lib/rrdFilter_js.html624
-rw-r--r--doc/lib/rrdFlot_js.html36
3 files changed, 505 insertions, 161 deletions
diff --git a/doc/lib/index.html b/doc/lib/index.html
index 3f8ae8b..3c7195c 100644
--- a/doc/lib/index.html
+++ b/doc/lib/index.html
@@ -31,19 +31,19 @@
</UL>
<P>Together they can be used to implement AJAX style applications.</P>
-<P> The <A HREF="rrdFilter_js.html">rrdFilter module</A> can be used to filter datasources or apply user-customized filter object such as mathematical operations.
+<P> The <A HREF="rrdFilter_js.html">rrdFilter module</A> can be used to filter datasources (DSs) and apply user-customized filter objects such as mathematical operations. This module also has methods to Filter RRAs for time shifts (for timezone implementation) and/or Averaging (for creating new, averaged RRAs with different step sizes). See the <A HREF="../../src/examples/rrdJFlotFilter.html">rrdJFlotFilter.html (DS Filters) example</A> and the <A HREF="../../src/examples/rrdJFlotFilterRRA.html">rrdJFlotFilterRRA (RRA Filters) example</A>.</P>
<P>The package also provides two classes, based on
<A HREF="http://code.google.com/p/flot/">JFlot</A>,
that automate most of the graphing needs:</P>
<UL>
<LI><P>The <A HREF="rrdFlot_js.html">rrdFlot module</A> can be used to plot a single RRD file.<BR>
- See also the <A HREF="../../src/examples/rrdJFlot.html">rrdJFlot.html example</A>.</P>
+ See also the <A HREF="../../src/examples/rrdJFlot.html">rrdJFlot.html example</A> and the <A HREF="../../src/examples/rrdJFlotDefaults.html">same graph with all rrdflot_defaults available options shown.</A></P>
<LI><P>The <A HREF="rrdFlotMatrix_js.html">rrdFlotMatrix module</A> can be used to plot a list of RRD files.<BR>
See also the <A HREF="../../src/examples/rrdMatrixFlot.html">rrdMatrixFlot.html example</A>.</P>
<LI><P>More examples can be found on the
- <A HREF="../../src/examples/index.html">examples web page</a>.</P>
+ <A HREF="../../src/examples/index.html">examples web page</a>, with mode helpful comments in the code.</P>
</UL>
<TABLE WIDTH=50% CELLPADDING=2 CELLSPACING=2>
diff --git a/doc/lib/rrdFilter_js.html b/doc/lib/rrdFilter_js.html
index 50bad22..aa15673 100644
--- a/doc/lib/rrdFilter_js.html
+++ b/doc/lib/rrdFilter_js.html
@@ -38,20 +38,31 @@
</TR>
</TABLE>
<H2 CLASS="heading-2-western">Overview</H2>
-<P>The rrdFilter module is allows filters to be applied to DSs (datasources).</P>
+<P>The rrdFilter module is allows filters to be applied to DSs (datasources) and RRA objects.</P>
<P>(These classes should have almost idential instantiations to their rrdFile module equivilents.)</P>
-<P>Filters can either be a list of DSs to filter out (*FilterDS), or a user-created and customized filter object (*FilterOp - for example, mathematical functions like summing and averaging DSs).
-<P>Clases included in this module:
-<UL><LI>RRDRRAFilterDS
-<LI>RRDFilterDS
-<LI>RRDDSFilterOp
-<LI>RRDRRAFIlterOp
-<LI>RRDFilterOp.</UL>
+<P>For DSs, filters can either be a list of DSs to filter out (*FilterDS), or a user-created and customized filter object (*FilterOp - for example, mathematical functions like summing and averaging DSs).
+<P> THese classes are:
+<UL><LI>RRDFilterDS
+<LI>RRDFilterOp</UL>
+
+<P>For RRAs, two things can be done - An RRA can be shifted by any number of seconds (for timezone selection, for instance) [RRDFilterShift], or any number of new RRAs can be created (based on other RRAs) with their data averaged [RRDRRAFilterAvg]. See individual classes for details.
+<P>These classes are:
+<UL><LI>RRDFilterShift
+<LI>RRDRRAFilterAvg</UL>
-<H2 CLASS="heading-2-western"><A NAME="RRDRRAFilterDS"></A>Class RRDRRAFilterDS</H2>
-<P> This class filters out a subset of DSs from an RRA identified by index or name. </P>
-<P>The constructor has two arguments: rrd_rra (the RRA) and ds_list (the list of DSs to filter).</P>
+<H4 CLASS="heading-2-western">Internal classes for Developers, Listed at the End:</H4>
+<LI>RRDRRAFilterDS
+<LI>RRDRRAFilterOp
+<LI>RRDDSFilterOp
+<LI>RRAFilterAvg
+<LI>RRAInfoFilterAvg.</UL>
+<HR>
+<H2> Main Classes: <H2>
+<HR>
+<H3> RRD Filter Classes: <H3>
+<H2 CLASS="heading-2-western"><A NAME="RRDFilterDS"></A>Class RRDFilterDS</H2>
+<P> This class filters out a subset of DSs from an RRD identified by index or name. </P>
<P>This class implements the following methods:</P>
<DIV ALIGN=RIGHT>
<TABLE WIDTH=90% BORDER=1 CELLPADDING=2 CELLSPACING=3>
@@ -67,69 +78,116 @@
</TH>
</TR>
</THEAD>
- <TBODY>
- <TR VALIGN=TOP>
- <TD WIDTH=20%>
- <P>getIdx()</P>
- </TD>
- <TD WIDTH=80%>
- <P>Return which RRA it is in the RRD file.</P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=20%>
- <P>getNrRows()</P>
- </TD>
- <TD WIDTH=80%>
- <P>Return the number of rows in the RRA.</P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=20%>
- <P>getNrDSs()</P>
- </TD>
- <TD WIDTH=80%>
- <P>Return the number of DSs in the RRD file.</P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=20%>
- <P>getStep()</P>
- </TD>
- <TD WIDTH=80%>
- <P>Return the number of seconds between rows.</P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=20%>
- <P>getCFName()</P>
- </TD>
- <TD WIDTH=80%>
- <P>Return the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Consolidation
- Function</A> used by the RRA.</P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=20%>
- <P>getEl(r,d)</P>
- </TD>
- <TD WIDTH=80%>
- <P>Return the value for the d-th DS in the r-th row.</P>
- </TD>
- </TR>
- <TR VALIGN=TOP>
- <TD WIDTH=20%>
- <P>getElFast(r,d)</P>
- </TD>
- <TD WIDTH=80%>
- <P>Return the low-precision value for the d-th DS in the r-th row.</P>
- </TD>
- </TR>
- </TBODY>
+ <TBODY>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getMinSteps()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the base <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#I__step__s_step__default__300_seconds_">interval
+ in seconds</A> that was used to feed the RRD file.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getLastUpdate()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the timestamp of the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdlastupdate.en.html">last
+ update</A>.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getNrDSs()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the number of <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
+ Sources</A> present in the RRD file.
+ </P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getDSNames()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the names of the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
+ Sources</A> present in the RRD file.
+ </P>
+ </TD>
+<TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getDS(id)</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>If id is a number, return an object of type <A HREF="#RRDDS">RRDDS</A> holding
+ the information about the id-th <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
+ Source</A>.</P>
+ <P>If id is a string, return an object of type <A HREF="#RRDDS">RRDDS</A> holding
+ the information about the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
+ Source</A> with the requested name.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getNrRRAs()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the number of <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Round
+ Robin Archives</A> present in the RRD file.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getRRAInfo(n)</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return an object of type <A HREF="#RRDRRAInfo">RRDRRAInfo</A>
+ holding the information about the n-th <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Round
+ Robin Archive</A>.</P>
+ </TD>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getRRA(n)</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return an object of type <A HREF="#RRDRRA">RRDRRA</A> that
+ can be used to access the values stored in the n-th <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Round
+ Robin Archive</A>.</P>
+ </TD>
+ </TR>
+ </TBODY>
</TABLE>
</DIV>
-<H2 CLASS="heading-2-western"><A NAME="RRDFilterDS"></A>Class RRDFilterDS</H2>
-<P> This class filters out a subset of DSs from an RRD identified by index or name. </P>
+<P>
+<H2 CLASS="heading-2-western"><A NAME="RRDFilterOp"></A>Class RRDFilterOp</H2>
+<P>This class filters all of the DSs in an RRD by a list of filter objects.</UL>
+<PRE>
+ The filter object must implement the following interface
+ getName() - Symbolic name give to this function
+ getDSName() - list of DSs used in computing the result (names or indexes)
+ computeResult(val_list) - val_list contains the values of the requested DSs (in the same order)
+
+ Example classes that implement the interface:
+ function DoNothing(ds_name) { //Leaves the DS alone.
+ this.getName = function() {return ds_name;}
+ this.getDSNames = function() {return [ds1_name];}
+ this.computeResult = function(val_list) {return val_list[0];}
+ }
+ function sumDS(ds1_name,ds2_name) { //Sums the two DSs.
+ this.getName = function() {return ds1_name+"+"+ds2_name;}
+ this.getDSNames = function() {return [ds1_name,ds2_name];}
+ this.computeResult = function(val_list) {return val_list[0]+val_list[1];}
+ }
+
+ Lets say you have 2 DSs. To add a summed DS of DS1 and DS2:
+ var ds0_name = rrd_data.getDS(0).getName();
+ var ds1_name = rrd_data.getDS(1).getName();
+ rrd_data = new RRDFilterOp(rrd_data, [new DoNothing(ds0_name),
+ DoNothing(ds1_name), sumDS(ds0_name, ds1_name]);
+</PRE>
+<P>Its arguments are: rrd_file and op_obj_list (list of ds filters).
<P>This class implements the following methods:</P>
<DIV ALIGN=RIGHT>
<TABLE WIDTH=90% BORDER=1 CELLPADDING=2 CELLSPACING=3>
@@ -226,24 +284,17 @@
</TR>
</TBODY>
</TABLE>
-</DIV>
+</DIV>
+
<HR>
-<H2 CLASS="heading-2-western"><A NAME="RRDDSFilterOP"></A>Class RRDDSFilterOp</H2>
-<P>This class filters DSs from an RRD by using a user-provided filter object. </P>
-<P>This object must implement the following interface:</P>
-<UL>
-<LI>getName() - Symbolic name give to this function
-<LI>getDSName() - list of DSs used in computing the result (names or indexes)
-<LI>computeResult(val_list) - val_list contains the values of the requested DSs (in the same order)
-</UL>
-<P>For example, a summing function:</P>
-<UL>
-<P>function SumDS(ds1,ds2){
-<UL><P>this.getName() = function() {return ds1+"+"+ds2} </P>
-<P>this.getDSName = function() {return [ds1,ds2]}</P>
-<P>this.computeResult = function(val_list) {return val_list[0]+val_list[1]}}</P>
-</UL></UL>
-<P>This class has three arguments: rrd_file, op_object (the filter object) and my_idx (index of new DS in case old one was modified by a filter).
+<H3 CLASS="heading-2-western">RRA Filters:</H3>
+<H2 CLASS="heading-2-western"><A NAME="RRAFilterShift"></A>Class RRAFilterShift</H2>
+<P>This class creates new, time-shifted RRAs. Originally developed for timezone shifting.
+<P>Arguments:
+<UL><LI>1. The RRD File
+<LI>2. Shift Int - the number of seconds to shift by (1 hour = 3600s).
+<LI>3. RRA index List - A list of the RRAs (by their indicies) to be shifted; usually all RRAs in the File are included. </UL>
+
<P>This class implements the following methods:</P>
<DIV ALIGN=RIGHT>
<TABLE WIDTH=90% BORDER=1 CELLPADDING=2 CELLSPACING=3>
@@ -262,70 +313,221 @@
<TBODY>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getIdx()</P>
+ <P>getMinSteps()</P>
</TD>
<TD WIDTH=80%>
- <P>Return which DS it is in the RRD file.</P>
+ <P>Return the base <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#I__step__s_step__default__300_seconds_">interval
+ in seconds</A> that was used to feed the RRD file.</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getName()</P>
+ <P>getLastUpdate()</P>
</TD>
<TD WIDTH=80%>
- <P>Return the name of the data source.</P>
+ <P>Return the timestamp of the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdlastupdate.en.html">last
+ update</A>.</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getType()</P>
+ <P>getNrDSs()</P>
</TD>
<TD WIDTH=80%>
- <P>Return the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">type</A>
- of the data source.</P>
+ <P>Return the number of <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
+ Sources</A> present in the RRD file.
+ </P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getMin()</P>
+ <P>getDSNames()</P>
</TD>
- <TD ROWSPAN=2 WIDTH=80%>
- <P>Return the minimum and maximum value the data source can
- contain.
+ <TD WIDTH=80%>
+ <P>Return the names of the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
+ Sources</A> present in the RRD file.
</P>
- <P>If either is not defined, <I>undefined</I> is returned.</P>
+ </TD>
+<TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getDS(id)</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>If id is a number, return an object of type <A HREF="#RRDDS">RRDDS</A> holding
+ the information about the id-th <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
+ Source</A>.</P>
+ <P>If id is a string, return an object of type <A HREF="#RRDDS">RRDDS</A> holding
+ the information about the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
+ Source</A> with the requested name.</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getMax()</P>
+ <P>getNrRRAs()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the number of <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Round
+ Robin Archives</A> present in the RRD file.</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getRealDSList()</P>
+ <P>getRRAInfo(n)</P>
</TD>
<TD WIDTH=80%>
- <P>Returns which DSs is being used in the Filter.</P>
+ <P>Return an object of type <A HREF="#RRDRRAInfo">RRDRRAInfo</A>
+ holding the information about the n-th <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Round
+ Robin Archive</A>.</P>
</TD>
- </TR>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>ComputeResult()</P>
+ <P>getRRA(n)</P>
</TD>
<TD WIDTH=80%>
- <P>Return the computed result of the filter object on the DSs.</P>
+ <P>Return an object of type <A HREF="#RRDRRA">RRDRRA</A> that
+ can be used to access the values stored in the n-th <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Round
+ Robin Archive</A>.</P>
</TD>
</TR>
</TBODY>
+ </TABLE>
+</DIV>
+<HR>
+<H2 CLASS="heading-2-western"><A NAME="RRDRRAFilterAvg"></A>Class RRDRRAFilterAvg</H2>
+<P>This class creates new RRAs (based on original RRAs in the RRD File) that have different time steps. This is useful for creating new RRA graphs with different time steps without actually creating and filling new RRAs.
+<P>Arguments:
+<UL><LI>1. The RRD File
+<LI>2. List of Filter Objects. Each object must instantiate getIdx, which returns the index of the RRA to use in the RRD File, and getStep, which returns the step size of the RRA. (If getStep returns null, the filter will use the original step size given by the RRA specified by getIdx). </UL>
+<P>Examples of RRA Filter Objects: </P>
+<PRE>
+ //This RRA Filter object leaves the original RRA unchanged.
+ function RRADoNothing(rra_idx) {
+ this.getIdx = function() {return rra_idx;}
+ this.getStep = function() {return null;}
+ }
+
+ /* This Filter creates a new RRA with a different step size
+ / based on another RRA, whose data the new RRA averages.
+ / rra_idx should be index of RRA with largest step size
+ / that doesn't exceed new step size. */
+ function RRA_Avg(rra_idx,new_step_in_seconds) {
+ this.getIdx = function() {return rra_idx;}
+ this.getStep = function() {return new_step_in_seconds;}
+ }
+</PRE>
+<P>For instance, if you have 3 RRAs with 5 second, 60 second and 3600 second intervals, and would like an RRA with 1800 second steps along with them, create:
+<PRE> new RRDRRAFilterAvg(rrd_file, object_list);
+ object_list = [new RRADoNothing(0), new RRADoNothing(1), new RRADoNothing(2), new RRA_Avg(1,1800)].
+</PRE>
+<P>It's best to use the RRA with the next smallest step size as a basis. It's also best to make steps integer multiples of the original RRA step sizes. For instance, using a 45 minute step, a 6 hour (= 45mins x 8) step would be better than 4 hour step (=45 mins x 5.33...).
+<P>This class implements the following methods:</P>
+<DIV ALIGN=RIGHT>
+ <TABLE WIDTH=90% BORDER=1 CELLPADDING=2 CELLSPACING=3>
+ <COL WIDTH=51*>
+ <COL WIDTH=205*>
+ <THEAD>
+ <TR VALIGN=TOP>
+ <TH WIDTH=20%>
+ <P ALIGN=LEFT>Method</P>
+ </TH>
+ <TH WIDTH=80%>
+ <P ALIGN=LEFT>Description</P>
+ </TH>
+ </TR>
+ </THEAD>
+ <TBODY>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getMinSteps()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the base <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#I__step__s_step__default__300_seconds_">interval
+ in seconds</A> that was used to feed the RRD file.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getLastUpdate()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the timestamp of the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdlastupdate.en.html">last
+ update</A>.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getNrDSs()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the number of <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
+ Sources</A> present in the RRD file.
+ </P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getDSNames()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the names of the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
+ Sources</A> present in the RRD file.
+ </P>
+ </TD>
+<TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getDS(id)</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>If id is a number, return an object of type <A HREF="#RRDDS">RRDDS</A> holding
+ the information about the id-th <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
+ Source</A>.</P>
+ <P>If id is a string, return an object of type <A HREF="#RRDDS">RRDDS</A> holding
+ the information about the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
+ Source</A> with the requested name.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getNrRRAs()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the number of <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Round
+ Robin Archives</A> present in the RRD file.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getRRAInfo(n)</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return an object of type <A HREF="#RRDRRAInfo">RRDRRAInfo</A>
+ holding the information about the n-th <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Round
+ Robin Archive</A>.</P>
+ </TD>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getRRA(n)</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return an object of type <A HREF="#RRDRRA">RRDRRA</A> that
+ can be used to access the values stored in the n-th <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Round
+ Robin Archive</A>.</P>
+ </TD>
+ </TR>
+ </TBODY>
</TABLE>
-</DIV>
-<H2 CLASS="heading-2-western"><A NAME="RRDRRAFilterOP"></A>Class RRDRRAFilterDS</H2>
-<P> This class filters out a subset of DSs from an RRA using by a filter object. </P>
-<P>The constructor has two arguments: rrd_rra (the RRA) and ds_list (the list of DS filters).</P>
+</DIV>
+
+
+<HR>
+<H3 CLASS="heading-2-western">Internal Methods for Developers</H3>
+<H4> For RRDFilterDS: </H4>
+<H2 CLASS="heading-2-western"><A NAME="RRDRRAFilterDS"></A>Class RRDRRAFilterDS</H2>
+<P> This class filters out a subset of DSs from an RRA identified by index or name. </P>
+<P>The constructor has two arguments: rrd_rra (the RRA) and ds_list (the list of DSs to filter).</P>
-<P>This class also implements the following methods:</P>
+<P>This class implements the following methods:</P>
<DIV ALIGN=RIGHT>
<TABLE WIDTH=90% BORDER=1 CELLPADDING=2 CELLSPACING=3>
<COL WIDTH=51*>
@@ -401,9 +603,10 @@
</TBODY>
</TABLE>
</DIV>
-<H2 CLASS="heading-2-western"><A NAME="RRDFilterOp"></A>Class RRDFilterOp</H2>
-<P>This class filters all of the DSs in an RRD by a list of filters.</UL>
-<P>Its arguments are: rrd_file and op_obj_list (list of ds filters).
+
+<H2 CLASS="heading-2-western"><A NAME="RRDDSFilterOP"></A>Class RRDDSFilterOp</H2>
+<P>This class filters DSs from an RRD by using a user-provided filter object. </P>
+<P>This class has three arguments: rrd_file, op_object (the filter object) and my_idx (index of new DS in case old one was modified by a filter).
<P>This class implements the following methods:</P>
<DIV ALIGN=RIGHT>
<TABLE WIDTH=90% BORDER=1 CELLPADDING=2 CELLSPACING=3>
@@ -422,85 +625,210 @@
<TBODY>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getMinSteps()</P>
+ <P>getIdx()</P>
</TD>
<TD WIDTH=80%>
- <P>Return the base <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#I__step__s_step__default__300_seconds_">interval
- in seconds</A> that was used to feed the RRD file.</P>
+ <P>Return which DS it is in the RRD file.</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getLastUpdate()</P>
+ <P>getName()</P>
</TD>
<TD WIDTH=80%>
- <P>Return the timestamp of the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdlastupdate.en.html">last
- update</A>.</P>
+ <P>Return the name of the data source.</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getNrDSs()</P>
+ <P>getType()</P>
</TD>
<TD WIDTH=80%>
- <P>Return the number of <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
- Sources</A> present in the RRD file.
+ <P>Return the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">type</A>
+ of the data source.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getMin()</P>
+ </TD>
+ <TD ROWSPAN=2 WIDTH=80%>
+ <P>Return the minimum and maximum value the data source can
+ contain.
</P>
+ <P>If either is not defined, <I>undefined</I> is returned.</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getDSNames()</P>
+ <P>getMax()</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getRealDSList()</P>
</TD>
<TD WIDTH=80%>
- <P>Return the names of the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
- Sources</A> present in the RRD file.
- </P>
+ <P>Returns which DSs is being used in the Filter.</P>
</TD>
-<TR VALIGN=TOP>
+ </TR>
+ <TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getDS(id)</P>
+ <P>ComputeResult()</P>
</TD>
<TD WIDTH=80%>
- <P>If id is a number, return an object of type <A HREF="#RRDDS">RRDDS</A> holding
- the information about the id-th <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
- Source</A>.</P>
- <P>If id is a string, return an object of type <A HREF="#RRDDS">RRDDS</A> holding
- the information about the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IDS_ds_name_DST_dst_arguments">Data
- Source</A> with the requested name.</P>
+ <P>Return the computed result of the filter object on the DSs.</P>
</TD>
</TR>
+ </TBODY>
+ </TABLE>
+</DIV>
+<HR>
+<H3> For RRDRRAFilterAvg: </H3>
+<H2 CLASS="heading-2-western"><A NAME="RRAFilterAvg"</A>Class RRAFilterAvg</H2>
+<P>The constructor has two arguments: the RRA and the Filter object for that RRA.</P>
+<P>The filter changes the NrRows (number of rows) and the way the elements are fetched (getEl and getElFast).
+<P>All other attributes are copied from the base RRA (the rra given in the arguments).
+<DIV ALIGN=RIGHT>
+ <TABLE WIDTH=90% BORDER=1 CELLPADDING=2 CELLSPACING=3>
+ <COL WIDTH=51*>
+ <COL WIDTH=205*>
+ <THEAD>
+ <TR VALIGN=TOP>
+ <TH WIDTH=20%>
+ <P ALIGN=LEFT>Method</P>
+ </TH>
+ <TH WIDTH=80%>
+ <P ALIGN=LEFT>Description</P>
+ </TH>
+ </TR>
+ </THEAD>
+ <TBODY>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getIdx()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return which RRA it is in the RRD file (real index, not base RRA index).</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getNrRows()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the number of rows in the RRA.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getNrDSs()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the number of DSs in the RRD file.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getStep()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the number of seconds between rows.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getCFName()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Consolidation
+ Function</A> used by the RRA.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getEl(r,d)</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the value for the d-th DS in the r-th row, modified by the filter.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getElFast(r,d)</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the low-precision value for the d-th DS in the r-th row, modified by the filter.</P>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+</DIV>
+ <H2 CLASS="heading-2-western"><A NAME="RRAInfoFilterAvg"></A>Class RRAInfoFilterAvg</H2>
+<P>This class implements the methods needed to access the new RRA. The filter only changes the PdpPerRow.</P>
+<DIV ALIGN=RIGHT>
+ <TABLE WIDTH=90% BORDER=1 CELLPADDING=2 CELLSPACING=3>
+ <COL WIDTH=52*>
+ <COL WIDTH=204*>
+ <THEAD>
+ <TR VALIGN=TOP>
+ <TH WIDTH=20%>
+ <P ALIGN=LEFT>Method</P>
+ </TH>
+ <TH WIDTH=80%>
+ <P ALIGN=LEFT>Description</P>
+ </TH>
+ </TR>
+ </THEAD>
+ <TBODY>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getNrRRAs()</P>
+ <P>getIdx()</P>
</TD>
<TD WIDTH=80%>
- <P>Return the number of <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Round
- Robin Archives</A> present in the RRD file.</P>
+ <P>Return which RRA it is in the RRD file.</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getRRAInfo(n)</P>
+ <P>getNrRows()</P>
</TD>
<TD WIDTH=80%>
- <P>Return an object of type <A HREF="#RRDRRAInfo">RRDRRAInfo</A>
- holding the information about the n-th <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Round
- Robin Archive</A>.</P>
+ <P>Return the number of rows in the RRA.</P>
</TD>
+ </TR>
<TR VALIGN=TOP>
<TD WIDTH=20%>
- <P>getRRA(n)</P>
+ <P>getStep()</P>
</TD>
<TD WIDTH=80%>
- <P>Return an object of type <A HREF="#RRDRRA">RRDRRA</A> that
- can be used to access the values stored in the n-th <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Round
- Robin Archive</A>.</P>
+ <P>Return the number of seconds between rows.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getCFName()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return the <A HREF="http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html#IRRA_CF_cf_arguments">Consolidation
+ Function</A> used by the RRA.</P>
+ </TD>
+ </TR>
+ <TR VALIGN=TOP>
+ <TD WIDTH=20%>
+ <P>getPdpPerRow()</P>
+ </TD>
+ <TD WIDTH=80%>
+ <P>Return number of slots used for consolidation.</P>
</TD>
</TR>
</TBODY>
- </TABLE>
+ </TABLE>
</DIV>
+
+</TABLE>
+</DIV>
+
<TABLE WIDTH=50% CELLPADDING=2 CELLSPACING=2>
<TR>
<TD>
diff --git a/doc/lib/rrdFlot_js.html b/doc/lib/rrdFlot_js.html
index d3c2660..b517b66 100644
--- a/doc/lib/rrdFlot_js.html
+++ b/doc/lib/rrdFlot_js.html
@@ -128,20 +128,36 @@ creates an interactive
<P>rrdflot_defaults (optional)</P>
</TD>
<TD WIDTH=80%>
- <P>Dictionary of rrd_flot options.
+ <P>Dictionary of rrd_flot options. All are optional.
<P>The recognized elements and the default values are:
<PRE>
{
- legend: "Top" //Starting location of legend. Options are:
- //"Top","Bottom","TopRight","BottomRight","None".
- num_cb_rows: 12 //How many rows of DS checkboxes per column.
- multi_ds: false //"true" appends the name of the aggregation function to the
- //name of the DS element.
- multi_rra: false //"true" appends the name of the RRA consolidation function (CF)
- //(AVERAGE, MIN, MAX or LAST) to the name of the RRA. Useful for
- //RRAs over the same interval with different CFs.
- }
+ legend: "Top" //Starting location of legend. Options are:
+ // "Top","Bottom","TopRight","BottomRight","None".
+ num_cb_rows: 12 //How many rows of DS checkboxes per column.
+ use_elem_buttons: false //To be used in conjunction with num_cb_rows: This option
+ // creates a button above every column, which selects
+ // every element in the column.
+ multi_ds: false //"true" appends the name of the aggregation function to the
+ // name of the DS element.
+ multi_rra: false //"true" appends the name of the RRA consolidation function (CF)
+ // (AVERAGE, MIN, MAX or LAST) to the name of the RRA. Useful
+ // for RRAs over the same interval with different CFs.
+ use_checked_DSs: false //Use the list checked_DSs below.
+ checked_DSs: [] //List of elements to be checked by default when graph is loaded.
+ // Overwrites graph options.
+ use_rra: false //Whether to use the rra index specified below.
+ rra: 0 //RRA (rra index in rrd) to be selected when graph is loaded.
+ use_windows: false //Whether to use the window zoom specifications below.
+ window_min: 0 //Sets minimum for window zoom. X-axis usually in unix time.
+ window_max: 0 //Sets maximum for window zoom.
+ graph_height: "300px" //Height of main graph.
+ graph_width: "500px" //Width of main graph.
+ scale_height: "110px" //Height of small scaler graph.
+ scale_width: "250px" //Width of small scaler graph.
+ }
</PRE></P>
+See the <A HREF=:../../src/examples/rrdJFlotDefaults.html">rrdflot_defaults in action.</A>
</TD>
</TR>
</TABLE>